File tree Expand file tree Collapse file tree 1 file changed +22
-21
lines changed Expand file tree Collapse file tree 1 file changed +22
-21
lines changed Original file line number Diff line number Diff line change 1- name : " Sphinx: Render docs "
1+ name : documentation
22
3- on : push
3+ on : [push, pull_request, workflow_dispatch]
4+
5+ permissions :
6+ contents : write
47
58jobs :
6- build :
9+ docs :
710 runs-on : ubuntu-latest
8- permissions :
9- contents : write
1011 steps :
11- - uses : actions/checkout@v4
12- - name : Build HTML
13- uses : ammaraskar/sphinx-action@master
14- with :
15- pre-build-command : python -m pip install sphinx_rtd_theme
16- - name : Upload artifacts
17- uses : actions/upload-artifact@v4
18- with :
19- name : html-docs
20- path : docs/_build/html/
21- - name : Deploy
22- uses : peaceiris/actions-gh-pages@v3
23- if : github.ref == 'refs/heads/main'
24- with :
25- github_token : ${{ secrets.GITHUB_TOKEN }}
26- publish_dir : docs/_build/html
12+ - uses : actions/checkout@v4
13+ - uses : actions/setup-python@v5
14+ - name : Install dependencies
15+ run : |
16+ pip install sphinx sphinx_rtd_theme myst_parser
17+ - name : Sphinx build
18+ run : |
19+ sphinx-build docs docs/_build
20+ - name : Deploy to GitHub Pages
21+ uses : peaceiris/actions-gh-pages@v3
22+ if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
23+ with :
24+ publish_branch : gh-pages
25+ github_token : ${{ secrets.GITHUB_TOKEN }}
26+ publish_dir : docs/_build/
27+ force_orphan : true
You can’t perform that action at this time.
0 commit comments