Skip to content

Commit 83c212f

Browse files
committed
cicd: add mkdocs deployment
1 parent aab78c2 commit 83c212f

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Deploy MkDocs
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
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+
- uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Setup Python
27+
uses: actions/setup-python@v4
28+
with:
29+
python-version: '3.x'
30+
31+
- name: Install dependencies
32+
run: |
33+
pip install -r requirements.txt
34+
35+
- name: Build MkDocs
36+
run: |
37+
mkdocs build --strict
38+
39+
- name: Upload Pages artifact
40+
uses: actions/upload-pages-artifact@v2
41+
with:
42+
path: ./site
43+
44+
deploy:
45+
if: github.ref == 'refs/heads/main'
46+
environment:
47+
name: github-pages
48+
url: ${{ steps.deployment.outputs.page_url }}
49+
runs-on: ubuntu-latest
50+
needs: build
51+
steps:
52+
- name: Deploy to GitHub Pages
53+
id: deployment
54+
uses: actions/deploy-pages@v2

0 commit comments

Comments
 (0)