Skip to content

Commit

Permalink
Merge pull request #219 from gitroomhq/ci-build-cache
Browse files Browse the repository at this point in the history
Add NEXT JS Build cache
  • Loading branch information
jonathan-irvin authored Sep 9, 2024
2 parents 0fb5de5 + 56d04d9 commit 3372a8a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Build

on:
Expand All @@ -20,5 +21,18 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

# https://nextjs.org/docs/pages/building-your-application/deploying/ci-build-caching#github-actions
- uses: actions/cache@v4
with:
path: |
~/.npm
${{ 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') }}-
- run: npm ci
- run: npm run build

0 comments on commit 3372a8a

Please sign in to comment.