# 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: branch: - 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 --chached --quit; then echo "No changes" exit 0 fi git commit -m "chore: update API reference" git push