Skip to content

Commit d9c93a1

Browse files
committed
mkdocs
1 parent 6546e2d commit d9c93a1

1 file changed

Lines changed: 18 additions & 7 deletions

File tree

‎.github/workflows/docs.yml‎

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,29 @@
1-
name: ci
1+
name: website-mkdocs
22
on:
3-
workflow_dispatch:
43
push:
5-
branches:
4+
branches:
65
- main
6+
workflow_dispatch:
7+
permissions:
8+
contents: write
79
jobs:
810
deploy:
911
runs-on: ubuntu-latest
1012
steps:
1113
- uses: actions/checkout@v4
14+
- name: Configure Git Credentials
15+
run: |
16+
git config user.name github-actions[bot]
17+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
1218
- uses: actions/setup-python@v5
1319
with:
1420
python-version: 3.x
15-
- run: |
16-
pip install mkdocs-material
17-
cd docs
18-
mkdocs gh-deploy --force
21+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
22+
- uses: actions/cache@v3
23+
with:
24+
key: mkdocs-material-${{ env.cache_id }}
25+
path: .cache
26+
restore-keys: |
27+
mkdocs-material-
28+
- run: pip install mkdocs-material
29+
- run: mkdocs gh-deploy -f docs/mkdocs.yml --force

0 commit comments

Comments
 (0)
⌂ 换网址