Skip to content

Commit 4b05957

Browse files
authored
Use upstream docs publishing workflow (#532)
1 parent 9615ac8 commit 4b05957

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

.github/workflows/publish-docs.yml

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,33 @@
11
name: Publish docs via GitHub Pages
22
on:
33
push:
4-
branches: [ main ]
5-
4+
branches:
5+
- main
6+
permissions:
7+
contents: write
68
jobs:
7-
build:
9+
deploy:
810
name: Deploy docs
911
runs-on: ubuntu-latest
1012
steps:
1113
- name: Checkout main
1214
uses: actions/checkout@v4
15+
- name: Configure Git Credentials
16+
run: |
17+
git config user.name github-actions[bot]
18+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
1319
- uses: actions/setup-python@v5
1420
with:
15-
python-version: 'pypy3.9'
21+
python-version: 3.x
22+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
1623
- uses: actions/cache@v4
1724
with:
18-
key: ${{ github.ref }}
19-
path: .cache
20-
- name: Deploy docs
21-
uses: afritzler/mkdocs-gh-pages-action@main
22-
env:
23-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
key: mkdocs-material-${{ env.cache_id }}
26+
path: .cache
27+
restore-keys: |
28+
mkdocs-material-
29+
- run: pip install mkdocs-material
30+
- name: Deploy docs
31+
run: mkdocs gh-deploy --force
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)