Skip to content

Commit 1362b73

Browse files
committed
Fix cache not saving isssue
1 parent a6fad96 commit 1362b73

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/build-deploy-site.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,12 @@ jobs:
3131
pip install pyyaml requests
3232
3333
- name: Restore LeetCode API cache
34-
uses: actions/cache@v4
34+
uses: actions/cache/restore@v4
3535
with:
3636
path: .leetcode_cache.json
37-
key: leetcode-cache
37+
key: leetcode-cache-latest
38+
restore-keys: |
39+
leetcode-cache-
3840
3941
- name: Update READMEs
4042
run: python ./Scripts/update_readmes.py

.github/workflows/update-leetcode-grid.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ jobs:
6868
uses: actions/cache/restore@v4
6969
with:
7070
path: .leetcode_cache.json
71-
key: leetcode-cache
71+
key: leetcode-cache-${{ github.run_id }}
72+
restore-keys: |
73+
leetcode-cache-
7274
7375
- name: Generate LeetCode README table
7476
run: |
@@ -79,7 +81,7 @@ jobs:
7981
uses: actions/cache/save@v4
8082
with:
8183
path: .leetcode_cache.json
82-
key: leetcode-cache
84+
key: leetcode-cache-${{ github.run_id }}
8385

8486
- name: Commit and push changes
8587
run: |

0 commit comments

Comments
 (0)