File tree Expand file tree Collapse file tree 1 file changed +18
-34
lines changed
Expand file tree Collapse file tree 1 file changed +18
-34
lines changed Original file line number Diff line number Diff line change @@ -2,59 +2,43 @@ name: "docs: build and deploy"
22
33on :
44 push :
5- branches :
6- - main
7- workflow_dispatch : {}
5+ branches : [ main ]
6+ workflow_dispatch :
87
98permissions :
109 contents : read
1110 pages : write
1211 id-token : write
1312
1413concurrency :
15- group : ${{ github.workflow }}-${{ github.ref }}
14+ group : " pages "
1615 cancel-in-progress : true
1716
1817jobs :
19- build-and-deploy :
20- name : Build and publish Sphinx docs to GitHub Pages
18+ build :
2119 runs-on : ubuntu-latest
22-
2320 steps :
24- - name : Checkout
25- uses : actions/checkout@v4
26-
27- - name : Set up Python
28- uses : actions/setup-python@v5
21+ - uses : actions/checkout@v4
22+ - uses : actions/setup-python@v5
2923 with :
30- python-version : ' 3.11'
31- cache : ' pip'
32-
33- - name : Install dependencies
34- run : |
24+ python-version : ' 3.12'
25+ - run : |
3526 python -m pip install --upgrade pip
36- # install project and docs extras defined in pyproject.toml
3727 pip install -e ".[docs]"
38-
3928 - name : Build Sphinx HTML
40- working-directory : docs
41- run : |
42- sphinx-build -b html -a -E -W -T . _build/html
43-
44- - name : Upload pages artifact
45- uses : actions/upload-pages-artifact@v4
29+ run : sphinx-build -b html docs docs/_build/html
30+ - name : Upload Pages artifact
31+ uses : actions/upload-pages-artifact@v3
4632 with :
47-
4833 path : docs/_build/html
4934
50- deploy-pages :
51- name : Deploy to GitHub Pages
52- needs : build-and-deploy
35+ deploy :
36+ needs : build
5337 runs-on : ubuntu-latest
54- permissions :
55- pages : write
56- id-token : write
57-
38+ environment :
39+ name : github-pages
40+ url : ${{ steps.deployment.outputs.page_url }}
5841 steps :
5942 - name : Deploy to GitHub Pages
60- uses : actions/deploy-pages@v1
43+ id : deployment
44+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments