Jocelyn Badgley (Twipped) b027c43a18 Cache node_modules too
2021-08-25 11:01:07 -07:00

37 lines
950 B
YAML

name: Ensure Site Builds Cleanly
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install GraphicsMagick
run: sudo apt install graphicsmagick
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: '14'
cache: 'npm'
- name: Restore node_modulescache
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node_modules
- name: Restore Asset Caches
uses: actions/cache@v2
with:
key: if-cache
path: |
./if-cache
./twitter-cache.json
- run: npm i
- run: npm test
- run: npm run build