mirror of
https://github.com/modelscope/FunASR.git
synced 2026-10-12 02:19:18 +00:00
51 lines
1.5 KiB
YAML
51 lines
1.5 KiB
YAML
name: Update API Documentation
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'funasr/**/*.py'
|
|
- 'scripts/gen_api_docs.py'
|
|
- 'scripts/sync_vllm_guide.py'
|
|
- 'training.html'
|
|
- 'docs/**/*.md'
|
|
- 'examples/openai_api/**/*.md'
|
|
- 'runtime/**/*.md'
|
|
- 'web-pages/product-site/**'
|
|
- 'model_zoo/**'
|
|
- 'gh-pages-output/**'
|
|
- '.github/workflows/update-api-docs.yml'
|
|
|
|
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: Check generated vLLM compatibility guide
|
|
run: python3 scripts/sync_vllm_guide.py --check
|
|
|
|
- name: Render shared documentation sources
|
|
run: |
|
|
python3 -m pip install -r web-pages/product-site/requirements-site.txt
|
|
python3 web-pages/product-site/build.py --output /tmp/funasr-docs-site
|
|
python3 web-pages/product-site/validate.py /tmp/funasr-docs-site
|
|
python3 web-pages/product-site/export_docs.py --site /tmp/funasr-docs-site --output gh-pages-output
|
|
|
|
- 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
|