Skip to content

Build API Doc

Build API Doc #10

Workflow file for this run

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: Build API Doc
run: |
pdm run sphinx-apidoc -o docs/source/api hydro_roll -f -e --tocfile index
shell: bash
- name: Commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
branch: main
commit_message: "chore(docs): update api docs with sphinx-apidoc"