Skip to content

Commit

Permalink
Cache yarn dependencies properly
Browse files Browse the repository at this point in the history
  • Loading branch information
cypressf committed Jan 27, 2022
1 parent ffa115c commit a7a1986
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,20 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: "16"
cache: "yarn"
cache-dependency-path: "frontend/yarn.lock"

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
working-directory: frontend

- name: ⚡ Cache yarn dependencies
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-cache-folder-${{ hashFiles('**/yarn.lock', 'frontend/.yarnrc.yml') }}
restore-keys: |
yarn-cache-folder-
- name: 🔨 Build
run: |
Expand Down

0 comments on commit a7a1986

Please sign in to comment.