Skip to content

Commit 59ca4ee

Browse files
authored
fix: added missing cache (#7041)
1 parent b266643 commit 59ca4ee

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,18 @@ jobs:
7676
# regardless of having code changes or not
7777
fetch-depth: 1
7878

79+
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
80+
with:
81+
# See here for caching with `yarn` https://github.com/actions/cache/blob/main/examples.md#node---yarn or you can leverage caching with actions/setup-node https://github.com/actions/setup-node
82+
path: |
83+
~/.npm
84+
${{ github.workspace }}/.next/cache
85+
# Generate a new cache whenever packages or source files change.
86+
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
87+
# If source files changed but packages didn't, rebuild from a prior cache.
88+
restore-keys: |
89+
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
90+
7991
- name: Set up Node.js
8092
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
8193
with:

0 commit comments

Comments
 (0)