Merge pull request 'Chore(ci): add workflow to generate API reference' (#29) from chore/api-reference-workflow into main

Reviewed-on: #29
This commit was merged in pull request #29.
This commit is contained in:
jakob.scheid authored and Gitea committed 2026-09-22 13:26:43 +02:00
commit 274ed45167
2 files changed
+59

No files matched your search

@@ -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
+1
View File
@@ -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