mirror of
https://github.com/modelscope/FunASR.git
synced 2026-10-12 02:19:18 +00:00
ci: add GitHub Actions workflow for auto-updating API docs on code changes
- scripts/gen_api_docs.py: generates API HTML with source code + GitHub links - .github/workflows/update-api-docs.yml: triggers on funasr/**/*.py changes - Auto-deploys to gh-pages branch
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
name: Update API Documentation
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'funasr/**/*.py'
|
||||
|
||||
jobs:
|
||||
build-api-docs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Generate API docs
|
||||
run: python3 scripts/gen_api_docs.py
|
||||
|
||||
- name: Deploy to gh-pages
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./gh-pages-output
|
||||
publish_branch: gh-pages
|
||||
keep_files: true
|
||||
Reference in New Issue
Block a user