Files
jcloud-docsgen/.gitea/workflows/generate-api-reference.yml
T
2026-09-28 01:25:16 +02:00

58 lines
1.5 KiB
YAML

# Copyright 2026 jCloud
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Generate API reference
on:
push:
branches:
- main
permissions:
contents: write
jobs:
generate:
runs-on: python
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install jcloud-docsgen
run: |
pip install \
--index-url https://gitea.jcloud-services.ddns.net/api/packages/jCloud/pypi/simple/ \
--extra-index-url https://pypi.org/simple \
jcloud-docsgen
- name: Generate documentation
run: |
jcloud-docsgen python -T -f -o docs/reference ./src
- name: Commit and push
run: |
git config user.name "${{ vars.BOT_NAME }}"
git config user.email "${{ vars.BOT_EMAIL }}"
git add docs/reference
if git diff --cached --quiet; then
echo "No changes"
exit 0
fi
git commit -m "chore: update API reference"
git push