11---
2- name : CI/CD for MkDocs
3- on :
4- push :
5- branches :
6- - main
7- pull_request :
8- types :
9- - opened
10- - synchronize
11- branches :
12- - main
13- jobs :
14- build :
15- if : ${{ github.actor != 'dependabot[bot]' }}
16- name : Build doc
17- runs-on : forge
18- steps :
19- - uses : actions/checkout@v4
20- - name : Install Python
21- uses : actions/setup-python@v4
22- with :
23- python-version : ' 3.11'
24- - name : Install package with optional dependency 'doc'
25- run : |
26- python -m pip install --upgrade pip
27- pip install .[doc]
28- - name : Run MkDocs build
29- working-directory : ./docs
30- run : mkdocs build
31- - name : Upload Pages artifact
32- uses : actions/upload-pages-artifact@v2
33- with :
34- path : " docs/site/"
35- publish :
36- if : success() && github.ref == 'refs/heads/master'
37- name : Publish doc
38- needs : build
39- permissions :
40- pages : write
41- id-token : write
42- environment :
43- name : github-pages
44- url : ${{ steps.deployment.outputs.page_url }}
45- runs-on : forge
46- steps :
47- - name : Deploy to GitHub Pages
48- id : deployment
49- uses : actions/deploy-pages@v2
2+ name : Documentation CI/CD
3+ on :
4+ push :
5+ branches :
6+ - main
7+ tags :
8+ - ' *' # Later: \b[0-9]\.[0-9]+\.[0-9]+[ab]?[0-9]?\b
9+ pull_request :
10+ types :
11+ - opened
12+ - synchronize
13+ branches :
14+ - main
15+
16+ jobs :
17+ build :
18+ if : ${{ github.actor != 'dependabot[bot]' }}
19+ name : Build doc
20+ runs-on : ubuntu-latest
21+ steps :
22+ - uses : actions/checkout@v4
23+ - name : Install Python
24+ uses : actions/setup-python@v5
25+ with :
26+ python-version : ' 3.x'
27+ - name : Install package with optional dependency 'doc'
28+ run : |
29+ python -m pip install --upgrade pip
30+ pip install .[doc]
31+ - name : Run MkDocs build
32+ working-directory : ./docs
33+ run : mkdocs build
34+ - name : Upload Pages artifact
35+ uses : actions/upload-pages-artifact@v3
36+ with :
37+ path : " docs/site/"
38+ publish :
39+ if : success() && startsWith(github.ref, 'refs/tags')
40+ name : Publish doc
41+ needs : build
42+ permissions :
43+ pages : write
44+ id-token : write
45+ environment :
46+ name : github-pages
47+ url : ${{ steps.deployment.outputs.page_url }}
48+ runs-on : ubuntu-latest
49+ steps :
50+ - name : Deploy to GitHub Pages
51+ id : deployment
52+ uses : actions/deploy-pages@v4
0 commit comments