Skip to content

fix(amp): resolve autocast/GradScaler device type for non-CUDA accele… #184

fix(amp): resolve autocast/GradScaler device type for non-CUDA accele…

fix(amp): resolve autocast/GradScaler device type for non-CUDA accele… #184

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: Read retained Chinese API reference
uses: actions/checkout@v4
with:
ref: gh-pages
path: previous-pages
sparse-checkout: zh/api.html
sparse-checkout-cone-mode: false
persist-credentials: false
- 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
python3 web-pages/product-site/link_api_guides.py --output gh-pages-output --previous previous-pages
- 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