Skip to content

Commit 4f6a8e9

Browse files
committed
Cache site deployments
1 parent 665c189 commit 4f6a8e9

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/deploy.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,16 @@ jobs:
3030
with:
3131
node-version: '20'
3232
cache: 'npm'
33-
33+
- name: Restore cache
34+
uses: actions/cache@v4
35+
with:
36+
path: |
37+
.next/cache
38+
# Generate a new cache whenever packages or source files change.
39+
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
40+
# If source files changed but packages didn't, rebuild from a prior cache.
41+
restore-keys: |
42+
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
3443
- name: Install dependencies
3544
run: npm ci
3645

0 commit comments

Comments
 (0)