main.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. name: "FunASR Docs"
  2. on:
  3. pull_request:
  4. branches:
  5. - main
  6. push:
  7. branches:
  8. - main
  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. - name: deploy copy
  20. if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev_wjm' || github.ref == 'refs/heads/dev_lyh'
  21. run: |
  22. mkdir public
  23. touch public/.nojekyll
  24. mkdir public/en
  25. touch public/en/.nojekyll
  26. cp -r docs/_build/html/* public/en/
  27. mkdir public/m2met2
  28. touch public/m2met2/.nojekyll
  29. cp -r docs/m2met2/_build/html/* public/m2met2/
  30. mkdir public/m2met2_cn
  31. touch public/m2met2_cn/.nojekyll
  32. cp -r docs/m2met2_cn/_build/html/* public/m2met2_cn/
  33. - name: deploy github.io pages
  34. if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev_wjm' || github.ref == 'refs/heads/dev_lyh'
  35. uses: peaceiris/actions-gh-pages@v2.3.1
  36. env:
  37. GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
  38. PUBLISH_BRANCH: gh-pages
  39. PUBLISH_DIR: public