main.yml 924 B

123456789101112131415161718192021222324252627282930313233
  1. name: "FunASR Docs"
  2. on:
  3. pull_request:
  4. branches:
  5. - main
  6. push:
  7. branches:
  8. - dev
  9. jobs:
  10. docs:
  11. runs-on: ubuntu-latest
  12. steps:
  13. - uses: actions/checkout@v1
  14. - uses: ammaraskar/sphinx-action@master
  15. with:
  16. docs-folder: "docs_cn/"
  17. pre-build-command: "pip install sphinx-markdown-tables nbsphinx jinja2 recommonmark sphinx_rtd_theme"
  18. - name: deploy copy
  19. if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev'
  20. run: |
  21. mkdir public_cn
  22. touch public_cn/.nojekyll
  23. cp -r docs_cn/_build/html/* public_cn/
  24. - name: deploy github.io pages
  25. if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev'
  26. uses: peaceiris/actions-gh-pages@v2.3.1
  27. env:
  28. GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
  29. PUBLISH_BRANCH: gh-pages-cn
  30. PUBLISH_DIR: public_cn