Skip to content

Commit

Permalink
Cache yarn packages in GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
dotoleeoak committed Jun 26, 2021
1 parent 924a17a commit 1704e3a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/test-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,32 @@ jobs:

steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2
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/public
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-
- name: Install Node packages
working-directory: ${{ env.working-directory }}
run: yarn install

- name: Pre-build with Dll-Plugin
if: steps.cache-yarn.outputs.cache-hit != 'true'
working-directory: ${{ env.working-directory }}
run: yarn dll

Expand Down

0 comments on commit 1704e3a

Please sign in to comment.