Skip to content

Commit 0fd4933

Browse files
committed
CI: cache yarn directory
1 parent 4b0e793 commit 0fd4933

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,18 @@ jobs:
2020
with:
2121
node-version: "12.x"
2222

23+
- name: Get yarn cache directory path
24+
id: yarn-cache-dir-path
25+
run: echo "::set-output name=dir::$(yarn cache dir)"
26+
27+
- uses: actions/cache@v2
28+
id: yarn-cache
29+
with:
30+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
31+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
32+
restore-keys: |
33+
${{ runner.os }}-yarn-
34+
2335
- name: Install dependencies
2436
run: yarn --frozen-lockfile
2537

0 commit comments

Comments
 (0)