Skip to content

Commit df36efb

Browse files
committed
Add Github action to automatically regenerate mkdocs
1 parent 6ba9370 commit df36efb

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/mkdocs.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build and Deploy Documentation
2+
on:
3+
push:
4+
paths:
5+
- 'docs/**'
6+
- 'mkdocs.yml'
7+
branches:
8+
- main
9+
10+
permissions:
11+
contents: write
12+
13+
jobs:
14+
build-and-deploy:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: '3.x'
24+
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install mkdocs-material
29+
pip install mkdocs
30+
31+
- name: Build documentation
32+
run: mkdocs build
33+
34+
- name: Deploy to GitHub Pages
35+
uses: peaceiris/actions-gh-pages@v3
36+
with:
37+
github_token: ${{ secrets.GITHUB_TOKEN }}
38+
publish_dir: ./site
39+
publish_branch: gh-pages
40+
full_commit_message: 'docs: update documentation'

0 commit comments

Comments
 (0)