Add NEXT JS Build cache
This commit is contained in:
parent
0fb5de5803
commit
56d04d962e
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
name: Build
|
||||
|
||||
on:
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue