Skip to content

Commit f8df189

Browse files
committed
Update actions/cache to v4
1 parent 9ae29f2 commit f8df189

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/cd.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,15 @@ jobs:
1616
uses: actions/checkout@master
1717

1818
- name: Cache
19-
uses: actions/cache@v2
19+
uses: actions/cache@v4
2020
with:
21-
path: ${{ github.workspace }}/.next/cache
22-
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}
21+
path: |
22+
.next/cache
23+
# Generate a new cache whenever packages or source files change.
24+
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
25+
# If source files changed but packages didn't, rebuild from a prior cache.
26+
restore-keys: |
27+
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
2328
2429
- name: Setup node env
2530
uses: actions/setup-node@v2.1.2

0 commit comments

Comments
 (0)