Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix node_modules caching #59

Merged
merged 1 commit into from
May 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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