Build API Doc #16
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build API Doc | |
on: | |
push: | |
tags: | |
- "v*" | |
workflow_dispatch: | |
inputs: | |
reason: | |
type: string | |
required: false | |
description: 'The reason to manually trigger api doc build' | |
jobs: | |
update-api-doc: | |
runs-on: ubuntu-latest | |
environment: release | |
permissions: | |
contents: write | |
pull-requests: write | |
id-token: write | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pdm-project/setup-pdm@v4 | |
name: Setup PDM | |
with: | |
python-version: 3.9 | |
cache: true | |
# - name: sync pdm.lock | |
# run: pdm sync | |
- name: Install dependencies | |
run: pdm install --group docs --dev --no-default | |
- name: Remove API Doc | |
run: rm -rf docs/source/api | |
- name: Clone Submodule | |
run: | | |
git submodule update --init --recursive | |
- name: Moving Submodule | |
run: | | |
ls | |
mv DiceParser/src/oneroll OneRoll | |
mv GetPlayerCard/get_pc getPCCard | |
mv HydroRollCore/hrc HRC | |
mv TRPGNivis/nivis_python TRPGNivisSDK | |
- name: Build API Doc For HydroRoll | |
run: | | |
pdm run sphinx-apidoc -o docs/source/api hydro_roll getPCCard HRC TRPGNivisSDK OneRoll -f -e --tocfile index | |
# pdm run sphinx-apidoc -o docs/source/api getPCCard -f -e --tocfile index | |
# pdm run sphinx-apidoc -o docs/source/api HRC -f -e --tocfile index | |
# pdm run sphinx-apidoc -o docs/source/api TRPGNivisSDK -f -e --tocfile index | |
# pdm run sphinx-apidoc -o docs/source/api OneRoll -f -e --tocfile index | |
- name: Remove Temp Folder | |
run: | | |
rm -rf OneRoll | |
rm -rf getPCCard | |
rm -rf HRC | |
rm -rf TRPGNivisSDK | |
ls docs/source/api | |
- name: Remove Submodule | |
run: | | |
git submodule deinit -f DiceParser | |
git submodule deinit -f GetPlayerCard | |
git submodule deinit -f HydroRollCore | |
git submodule deinit -f TRPGNivis | |
- name: Commit | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
branch: ${{ github.event.branch }} | |
commit_message: "chore(docs): update api docs with sphinx-apidoc" |