File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change 1
1
name : Run mkdocs
2
+
2
3
on :
4
+ # Allows this workflow to run automatically on commits pushed to main branch
3
5
push :
4
6
branches :
5
7
- main
6
8
9
+ # Sets permissions of the GITHUB_TOKEN to allow files to be committed to gh-pages branch
7
10
permissions :
8
11
contents : write
12
+
13
+
9
14
jobs :
10
15
deploy :
11
16
runs-on : ubuntu-latest
17
+
12
18
steps :
13
19
- name : Checkout repository
14
20
uses : actions/checkout@v4
21
+ with :
22
+ fetch-depth : 0
15
23
16
24
- name : Instal pgnquant for optimize plugin
17
25
run : sudo apt-get install pngquant
@@ -25,13 +33,16 @@ jobs:
25
33
run : pip install mkdocs-monorepo-plugin mkdocs-redirects mkdocs-git-authors-plugin mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 Pillow 'mkdocs-material[imaging]'
26
34
27
35
- name : Set up build cache
28
- uses : actions/cache@v2
36
+ run : echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
37
+ - uses : actions/cache@v4
29
38
with :
30
- key : ${{ github.ref }}
39
+ key : mkdocs-material- ${{ env.cache_id }}
31
40
path : .cache
41
+ restore-keys : |
42
+ mkdocs-material-
32
43
33
44
- name : Install Insiders build
34
45
env :
35
- GH_TOKEN : ${{ secrets.GH_TOKEN }}
36
- run : pip install git+https://${GH_TOKEN }@github.com/squidfunk/mkdocs-material-insiders.git
46
+ MKDOCS_TOKEN : ${{ secrets.MKDOCS_SECRET }}
47
+ run : pip install git+https://${MKDOCS_TOKEN }@github.com/squidfunk/mkdocs-material-insiders.git
37
48
- run : mkdocs gh-deploy --force
You can’t perform that action at this time.
0 commit comments