Skip to content

Commit 0199641

Browse files
update docs workflow
1 parent 589d780 commit 0199641

File tree

1 file changed

+14
-36
lines changed

1 file changed

+14
-36
lines changed

.github/workflows/docs.yml

Lines changed: 14 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,52 +4,30 @@ on:
44
push:
55
branches:
66
- main
7-
paths:
8-
- 'docs/**'
9-
- 'mkdocs.yml'
10-
- '.github/workflows/docs.yml'
117
workflow_dispatch:
128

139
permissions:
14-
contents: read
15-
pages: write
16-
id-token: write
17-
18-
concurrency:
19-
group: "pages"
20-
cancel-in-progress: false
10+
contents: write
2111

2212
jobs:
23-
build:
13+
deploy:
2414
runs-on: ubuntu-latest
2515
steps:
2616
- uses: actions/checkout@v4
2717

28-
- name: Setup Python
29-
uses: actions/setup-python@v4
18+
- uses: actions/setup-python@v5
3019
with:
31-
python-version: '3.8'
32-
33-
- name: Install dependencies
34-
run: |
35-
pip install mkdocs mkdocs-material
36-
pip install mkdocstrings[python] pymdown-extensions
20+
python-version: 3.8
3721

38-
- name: Build documentation
39-
run: mkdocs build
22+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
4023

41-
- name: Upload artifact
42-
uses: actions/upload-pages-artifact@v2
24+
- uses: actions/cache@v4
4325
with:
44-
path: ./site
45-
46-
deploy:
47-
environment:
48-
name: github-pages
49-
url: ${{ steps.deployment.outputs.page_url }}
50-
runs-on: ubuntu-latest
51-
needs: build
52-
steps:
53-
- name: Deploy to GitHub Pages
54-
id: deployment
55-
uses: actions/deploy-pages@v3
26+
key: mkdocs-material-${{ env.cache_id }}
27+
path: .cache
28+
restore-keys: |
29+
mkdocs-material-
30+
31+
- run: pip install mkdocs-material mkdocstrings[python] pymdown-extensions
32+
33+
- run: mkdocs gh-deploy --force

0 commit comments

Comments
 (0)