From 89451c34e3e072772157896be7b65e00cc230c1c Mon Sep 17 00:00:00 2001 From: Jakob Scheid Date: Tue, 22 Sep 2026 13:14:45 +0200 Subject: [PATCH 1/2] chore(ci): add workflow to generate API reference Added a workflow which generates the API reference and commits and pushes it. --- .gitea/workflows/generate-api-reference.yml | 58 +++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .gitea/workflows/generate-api-reference.yml diff --git a/.gitea/workflows/generate-api-reference.yml b/.gitea/workflows/generate-api-reference.yml new file mode 100644 index 0000000..48b3832 --- /dev/null +++ b/.gitea/workflows/generate-api-reference.yml @@ -0,0 +1,58 @@ +# 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: | + rm -rf docs/reference + jcloud-docsgen python -T -o docs/reference . + + - 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 From 62206db574c6dab6fef09c51d0792060400ca529 Mon Sep 17 00:00:00 2001 From: Jakob Scheid Date: Tue, 22 Sep 2026 13:16:35 +0200 Subject: [PATCH 2/2] docs(changelog): add entry for API reference pipeline Added a changelog entry for the CI pipeline which generated the API reference. --- docs/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index af04b96..3dd2a71 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -5,6 +5,7 @@ ### Added - CLI for `jcloud-docsgen` that can be called without `python3 -m ...` +- CI pipeline to generate API reference on every push or merge on `main` ### Changed