Skip to content

Commit e895255

Browse files
authored
Merge pull request #2223 from marxin/CI-cache-restore-key
CI: use key-restore for cache GH action
2 parents 100f2c3 + adb70de commit e895255

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/ci.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ jobs:
4141
uses: actions/cache/restore@v4
4242
with:
4343
path: book/linkcheck/cache.json
44-
key: linkcheck--${{ env.MDBOOK_LINKCHECK2_VERSION }}
44+
key: linkcheck--${{ env.MDBOOK_LINKCHECK2_VERSION }}--${{ github.run_id }}
45+
restore-keys: |
46+
linkcheck--${{ env.MDBOOK_LINKCHECK2_VERSION }}--
4547
4648
- name: Install latest nightly Rust toolchain
4749
if: steps.mdbook-cache.outputs.cache-hit != 'true'
@@ -66,7 +68,7 @@ jobs:
6668
uses: actions/cache/save@v4
6769
with:
6870
path: book/linkcheck/cache.json
69-
key: linkcheck--${{ env.MDBOOK_LINKCHECK2_VERSION }}
71+
key: linkcheck--${{ env.MDBOOK_LINKCHECK2_VERSION }}--${{ github.run_id }}
7072

7173
- name: Deploy to gh-pages
7274
if: github.event_name == 'push'

0 commit comments

Comments
 (0)