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:
TheCatLady
2021-04-25 10:18:31 -04:00
committed by GitHub
parent 28830d4ef8
commit f1e8250740
3 changed files with 30 additions and 20 deletions

View File

@@ -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: