Skip to content

Commit

Permalink
Add build cache for Next.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Ru Chern Chong committed Jul 27, 2024
1 parent fd7c865 commit f18661a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/sst.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ jobs:
with:
node-version: 20
cache: 'pnpm'
- uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.next/cache
key: ${{ runner.OS }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- name: Install dependencies
run: pnpm install
- name: Build
Expand All @@ -68,8 +74,7 @@ jobs:
- uses: pnpm/action-setup@v2
with:
version: latest
- uses: actions/cache@v3
name: Setup pnpm cache
- uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
Expand Down

0 comments on commit f18661a

Please sign in to comment.