Skip to content

Commit 50f447d

Browse files
committed
ci: add GitHub Actions workflow for MkDocs deployment
1 parent 2d56c8f commit 50f447d

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/mkdocs.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: mkdocs-deploy
2+
on:
3+
push:
4+
branches:
5+
- main
6+
paths:
7+
- 'mkdocs.yml'
8+
- 'docs/**'
9+
- '.github/workflows/mkdocs.yaml'
10+
permissions:
11+
contents: write
12+
jobs:
13+
deploy:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Configure Git Credentials
18+
run: |
19+
git config user.name github-actions[bot]
20+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
21+
- uses: actions/setup-python@v5
22+
with:
23+
python-version: 3.x
24+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
25+
- uses: actions/cache@v4
26+
with:
27+
key: mkdocs-material-${{ env.cache_id }}
28+
path: .cache
29+
restore-keys: |
30+
mkdocs-material-
31+
- run: pip install mkdocs-material
32+
- run: mkdocs gh-deploy --force

0 commit comments

Comments
 (0)