ci(nextjs): configure Next.js build cache (#1463) [skip ci]
https://nextjs.org/docs/messages/no-cache#github-actions Co-authored-by: sct <ryan@sct.dev>
This commit is contained in:
13
.github/workflows/snap.yaml
vendored
13
.github/workflows/snap.yaml
vendored
@@ -22,15 +22,20 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
container: node:14.16-alpine
|
||||
steps:
|
||||
- name: checkout
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: install dependencies
|
||||
- name: Cache Next.js build
|
||||
uses: actions/cache@v2.1.5
|
||||
with:
|
||||
path: ${{ github.workspace }}/.next/cache
|
||||
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package.json') }}
|
||||
- name: Install dependencies
|
||||
env:
|
||||
HUSKY_SKIP_INSTALL: 1
|
||||
run: yarn
|
||||
- name: lint
|
||||
- name: Lint
|
||||
run: yarn lint
|
||||
- name: build
|
||||
- name: Build
|
||||
run: yarn build
|
||||
|
||||
build-snap:
|
||||
|
||||
Reference in New Issue
Block a user