Skip to content

Commit 9b768ef

Browse files
committed
Add NextJS build cache
1 parent 6b1899d commit 9b768ef

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/deploy-to-dev.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,24 @@ jobs:
5757
- name: Test
5858
run: bun test
5959

60+
- name: Restore cache for NextJS
61+
uses: actions/cache/restore@v4
62+
with:
63+
path: ${{ github.workspace }}/.next/cache
64+
key: nextjs-${{ hashFiles('**/*.ts', '**/*.tsx') }}
65+
restore-keys: nextjs-
66+
6067
- name: Build
6168
env:
6269
VERSION: ${{ github.sha }}
6370
run: bun run build
6471

72+
- name: Save cache for NextJS
73+
uses: actions/cache/save@v4
74+
with:
75+
path: ${{ github.workspace }}/.next/cache
76+
key: nextjs-${{ hashFiles('**/*.ts', '**/*.tsx') }}
77+
6578
- name: Upload static files to CDN
6679
uses: nais/deploy/actions/cdn-upload/v2@master
6780
with:

0 commit comments

Comments
 (0)