main.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. name: "FunASR Docs"
  2. on:
  3. pull_request:
  4. branches:
  5. - main
  6. push:
  7. branches:
  8. - dev_wjm
  9. - dev_lyh
  10. jobs:
  11. docs:
  12. runs-on: ubuntu-latest
  13. steps:
  14. - uses: actions/checkout@v1
  15. - uses: ammaraskar/sphinx-action@master
  16. with:
  17. docs-folder: "docs/"
  18. pre-build-command: "pip install sphinx-markdown-tables nbsphinx jinja2 recommonmark sphinx_rtd_theme"
  19. - uses: ammaraskar/sphinx-action@master
  20. with:
  21. docs-folder: "docs_cn/"
  22. pre-build-command: "pip install sphinx-markdown-tables nbsphinx jinja2 recommonmark sphinx_rtd_theme"
  23. - uses: ammaraskar/sphinx-action@master
  24. with:
  25. docs-folder: "docs_m2met2/"
  26. pre-build-command: "pip install jinja2 sphinx_rtd_theme myst_parser"
  27. - name: deploy copy
  28. if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev_wjm' || github.ref == 'refs/heads/dev_lyh'
  29. run: |
  30. mkdir public
  31. touch public/.nojekyll
  32. mkdir public/en
  33. touch public/en/.nojekyll
  34. cp -r docs/_build/html/* public/en/
  35. mkdir public/cn
  36. touch public/cn/.nojekyll
  37. cp -r docs_cn/_build/html/* public/cn/
  38. mkdir public/m2met2
  39. touch public/m2met2/.nojekyll
  40. cp -r docs_m2met2/_build/html/* public/m2met2/
  41. - name: deploy github.io pages
  42. if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev_wjm' || github.ref == 'refs/heads/dev_lyh'
  43. uses: peaceiris/actions-gh-pages@v2.3.1
  44. env:
  45. GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
  46. PUBLISH_BRANCH: gh-pages
  47. PUBLISH_DIR: public