File tree Expand file tree Collapse file tree 1 file changed +64
-0
lines changed Expand file tree Collapse file tree 1 file changed +64
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy MkDocs to GitHub Pages
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ workflow_dispatch :
8+
9+ permissions :
10+ contents : read
11+ pages : write
12+ id-token : write
13+
14+ concurrency :
15+ group : " pages"
16+ cancel-in-progress : false
17+
18+ jobs :
19+ build :
20+ runs-on : ubuntu-latest
21+ steps :
22+ - name : Checkout
23+ uses : actions/checkout@v4
24+ with :
25+ fetch-depth : 0
26+
27+ - name : Setup Python
28+ uses : actions/setup-python@v5
29+ with :
30+ python-version : ' 3.12'
31+
32+ - name : Install uv
33+ uses : astral-sh/setup-uv@v3
34+
35+ - name : Install dependencies
36+ run : |
37+ uv sync --extra dev
38+ source .venv/bin/activate
39+
40+ - name : Build MkDocs site
41+ run : |
42+ source .venv/bin/activate
43+ mkdocs build --strict --site-dir ./_site
44+ env :
45+ CI : true
46+
47+ - name : Setup Pages
48+ uses : actions/configure-pages@v5
49+
50+ - name : Upload artifact
51+ uses : actions/upload-pages-artifact@v3
52+ with :
53+ path : ./_site
54+
55+ deploy :
56+ environment :
57+ name : github-pages
58+ url : ${{ steps.deployment.outputs.page_url }}
59+ runs-on : ubuntu-latest
60+ needs : build
61+ steps :
62+ - name : Deploy to GitHub Pages
63+ id : deployment
64+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments