Skip to content

Commit c066986

Browse files
committed
ci: update the docs deploy workflow to use the official mkdocs yml
1 parent b5acd72 commit c066986

File tree

1 file changed

+16
-30
lines changed

1 file changed

+16
-30
lines changed

.github/workflows/deploy_docs.yml

Lines changed: 16 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,33 @@
11
name: Deploy Documentation
2-
32
on:
43
push:
5-
branches: [ main ]
6-
4+
branches: [main]
75
permissions:
86
contents: read
97
pages: write
108
id-token: write
11-
129
concurrency:
1310
group: "pages"
1411
cancel-in-progress: false
15-
1612
jobs:
1713
deploy:
18-
environment:
19-
name: github-pages
20-
url: ${{ steps.deployment.outputs.page_url }}
2114
runs-on: ubuntu-latest
2215
steps:
23-
- name: Checkout
24-
uses: actions/checkout@v4
25-
26-
- name: Setup Python
27-
uses: actions/setup-python@v4
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
2822
with:
2923
python-version: 3.x
30-
31-
- name: Install dependencies
32-
run: pip install mkdocs-material
33-
34-
- name: Build documentation
35-
run: mkdocs build
36-
37-
- name: Setup Pages
38-
uses: actions/configure-pages@v4
39-
40-
- name: Upload artifact
41-
uses: actions/upload-pages-artifact@v3
24+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
25+
- uses: actions/cache@v4
4226
with:
43-
path: './site'
44-
45-
- name: Deploy to GitHub Pages
46-
id: deployment
47-
uses: actions/deploy-pages@v4
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
33+

0 commit comments

Comments
 (0)