Skip to content

Commit bd17cdd

Browse files
committed
cache .next/cache build directory
1 parent 9caa11c commit bd17cdd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,10 @@ jobs:
7878
uses: actions/cache@v3
7979
with:
8080
path: .next/cache
81-
key: ${{ runner.os }}-nextjs-${{ github.ref }}
81+
key: ${{ runner.os }}-nextjs-${{ github.ref_name }}-${{ hashFiles('yarn.lock') }}
8282
restore-keys: |
83-
${{ runner.os }}-nextjs
83+
${{ runner.os }}-nextjs-${{ github.ref_name }}-
84+
${{ runner.os }}-nextjs-
8485

8586
- name: Build Webapp
8687
run: yarn build
@@ -89,7 +90,7 @@ jobs:
8990
uses: actions/cache@v3
9091
with:
9192
path: .next/cache
92-
key: ${{ runner.os }}-nextjs-${{ github.ref }}
93+
key: ${{ runner.os }}-nextjs-${{ github.ref_name }}-${{ hashFiles('yarn.lock') }}
9394

9495
# Merge Blocker: Ensure Both Builds Pass
9596
merge_guard:

0 commit comments

Comments
 (0)