Skip to content

Commit

Permalink
ci(actions): fix node_modules caching
Browse files Browse the repository at this point in the history
  • Loading branch information
BobbyWibowo committed May 6, 2022
1 parent b17ea6c commit 0804ce9
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
- 'src/**/*.scss'
- 'src/versions.json'

env:
NODE_VERSION: 16

jobs:
build:
name: Rebuild client assets and bump v1 version string
Expand All @@ -20,11 +23,18 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '16.x'
cache: 'yarn'
node-version: ${{ env.NODE_VERSION }}

- name: Cache node_modules
uses: actions/cache@v2
id: cache-nodemodules
with:
path: node_modules
key: ${{ runner.os }}-${{ env.NODE_VERSION }}-nodemodules-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
run: yarn install
if: steps.cache-nodemodules.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile --non-interactive

- name: Update browserslist/caniuse-lite
run: npx browserslist@latest --update-db
Expand Down

0 comments on commit 0804ce9

Please sign in to comment.