File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed
Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish documentation
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ paths :
7+ - " docs/**"
8+ - " mkdocs.yml"
9+ pull_request :
10+ paths :
11+ - " docs/**"
12+ - " mkdocs.yml"
13+
14+ jobs :
15+ build :
16+ runs-on : ubuntu-latest
17+ steps :
18+ - uses : actions/checkout@v2
19+ - name : Configure GitHub Pages
20+ if : github.ref == 'refs/heads/prod'
21+ uses : actions/configure-pages@v5
22+
23+ - name : Setup python
24+ uses : actions/setup-python@v5
25+ with :
26+ python-version : 3.x
27+ - name : Install mkdocs and mkdocs dependencies
28+ run : pip install -r docs/requirements.txt
29+
30+ - name : Generate site using mkdocs
31+ run : mkdocs build
32+
33+ - name : Upload static files as artifact
34+ id : deployment
35+ if : github.ref == 'refs/heads/prod'
36+ uses : actions/upload-pages-artifact@v3
37+ with :
38+ path : site/
39+ deploy :
40+ if : github.ref == 'refs/heads/prod'
41+ permissions :
42+ contents : read
43+ pages : write # to deploy to Pages
44+ id-token : write # to verify the deployment originates from an appropriate source
45+ environment :
46+ name : github-pages
47+ url : ${{ steps.deployment.outputs.page_url }}
48+ runs-on : ubuntu-latest
49+ needs : build
50+ steps :
51+ - name : Deploy to GitHub Pages
52+ id : deployment
53+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments