Skip to content

Commit

Permalink
Cache whole node_modules instead of yarn cache
Browse files Browse the repository at this point in the history
  • Loading branch information
dotoleeoak committed Jun 26, 2021
1 parent 1704e3a commit 7f0eed1
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/test-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,19 @@ jobs:
with:
node-version: '14'

- name: Get yarn cache directory path
id: yarn-cache-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache Node modules
id: cache-yarn
uses: actions/cache@v2
with:
path: |
${{ steps.yarn-cache-path.outputs.dir }}
./frontend/node_modules
./frontend/public
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-
- name: Install Node packages
if: steps.cache-yarn.outputs.cache-hit != 'true'
working-directory: ${{ env.working-directory }}
run: yarn install

Expand Down

0 comments on commit 7f0eed1

Please sign in to comment.