Skip to content

Commit 4c08cb8

Browse files
committed
ci: Add docs deployment workflow
1 parent e6d5dd9 commit 4c08cb8

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

.github/workflows/docs.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
paths:
7+
- 'docs/**'
8+
- 'mkdocs.yml'
9+
- '.github/workflows/docs.yml'
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
concurrency:
18+
group: "pages"
19+
cancel-in-progress: false
20+
21+
jobs:
22+
build:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: actions/setup-python@v5
27+
with:
28+
python-version: '3.11'
29+
- run: pip install mkdocs-material
30+
- run: mkdocs build
31+
- uses: actions/upload-pages-artifact@v3
32+
with:
33+
path: site/
34+
35+
deploy:
36+
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
37+
needs: build
38+
runs-on: ubuntu-latest
39+
environment:
40+
name: github-pages
41+
url: ${{ steps.deployment.outputs.page_url }}
42+
steps:
43+
- uses: actions/deploy-pages@v4
44+
id: deployment

0 commit comments

Comments
 (0)