Skip to content

Commit

Permalink
Merge pull request #59 from BobbyWibowo/master
Browse files Browse the repository at this point in the history
ci: fix node_modules caching
  • Loading branch information
Pitu authored May 6, 2022
2 parents 5cab3b5 + a297c9d commit 16c8a67
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

env:
NODE_VERSION: 14

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
Expand All @@ -27,11 +30,18 @@ jobs:
- name: Install Node v14
uses: actions/setup-node@v3
with:
node-version: '14'
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: Build application
run: yarn build
Expand Down

0 comments on commit 16c8a67

Please sign in to comment.