Skip to content

Commit 03beefe

Browse files
Update workflow
Replace token variable Update cache action Add comments
1 parent 80ab5c4 commit 03beefe

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

.github/workflows/mkdocs.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
name: Run mkdocs
2+
23
on:
4+
# Allows this workflow to run automatically on commits pushed to main branch
35
push:
46
branches:
57
- main
68

9+
# Sets permissions of the GITHUB_TOKEN to allow files to be committed to gh-pages branch
710
permissions:
811
contents: write
12+
13+
914
jobs:
1015
deploy:
1116
runs-on: ubuntu-latest
17+
1218
steps:
1319
- name: Checkout repository
1420
uses: actions/checkout@v4
@@ -25,13 +31,16 @@ jobs:
2531
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]'
2632

2733
- name: Set up build cache
28-
uses: actions/cache@v2
34+
run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
35+
- uses: actions/cache@v4
2936
with:
30-
key: ${{ github.ref }}
37+
key: mkdocs-material-${{ env.cache_id }}
3138
path: .cache
39+
restore-keys: |
40+
mkdocs-material-
3241
3342
- name: Install Insiders build
3443
env:
35-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
36-
run: pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
44+
MKDOCS_TOKEN: ${{ secrets.MKDOCS_SECRET }}
45+
run: pip install git+https://${MKDOCS_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
3746
- run: mkdocs gh-deploy --force

0 commit comments

Comments
 (0)