File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : gh-pages
22
3- on : [push, pull_request, workflow_dispatch]
3+ on :
4+ push :
5+ branches : [gh-pages] # branch to trigger deployment
46
5- permissions :
6- contents : write
7+ # Cancel any in-progress job or run
8+ # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
9+ concurrency :
10+ group : ${{ github.ref }}
11+ cancel-in-progress : true
712
813jobs :
9- docs :
14+ pages :
1015 runs-on : ubuntu-latest
1116 steps :
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 _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 : _build/
27- force_orphan : true
17+ - id : deployment
18+ uses : sphinx-notes/pages@v3
19+ with :
20+ publish : false
21+ - uses : peaceiris/actions-gh-pages@v3
22+ with :
23+ github_token : ${{ secrets.GITHUB_TOKEN }}
24+ publish_dir : ${{ steps.deployment.outputs.artifact }}
You can’t perform that action at this time.
0 commit comments