File tree Expand file tree Collapse file tree 1 file changed +14
-36
lines changed Expand file tree Collapse file tree 1 file changed +14
-36
lines changed Original file line number Diff line number Diff line change 4
4
push :
5
5
branches :
6
6
- main
7
- paths :
8
- - ' docs/**'
9
- - ' mkdocs.yml'
10
- - ' .github/workflows/docs.yml'
11
7
workflow_dispatch :
12
8
13
9
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
21
11
22
12
jobs :
23
- build :
13
+ deploy :
24
14
runs-on : ubuntu-latest
25
15
steps :
26
16
- uses : actions/checkout@v4
27
17
28
- - name : Setup Python
29
- uses : actions/setup-python@v4
18
+ - uses : actions/setup-python@v5
30
19
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
37
21
38
- - name : Build documentation
39
- run : mkdocs build
22
+ - run : echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
40
23
41
- - name : Upload artifact
42
- uses : actions/upload-pages-artifact@v2
24
+ - uses : actions/cache@v4
43
25
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
You can’t perform that action at this time.
0 commit comments