Skip to content

Commit 6e7d630

Browse files
committed
Implement caching Yarn cache in GitHub Actions
1 parent 7835703 commit 6e7d630

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@ jobs:
1818
- name: Checkout
1919
uses: actions/checkout@v3
2020

21+
- name: Cache .yarn/cache
22+
uses: actions/cache@v3
23+
env:
24+
cache-name: yarn-cache
25+
with:
26+
path: .yarn/cache
27+
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
28+
restore-keys: |
29+
${{ runner.os }}-${{ env.cache-name }}
30+
2131
- name: Use Node.js
2232
uses: actions/setup-node@v3
2333
with:
@@ -39,6 +49,16 @@ jobs:
3949
- name: Checkout
4050
uses: actions/checkout@v3
4151

52+
- name: Cache .yarn/cache
53+
uses: actions/cache@v3
54+
env:
55+
cache-name: yarn-cache
56+
with:
57+
path: .yarn/cache
58+
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
59+
restore-keys: |
60+
${{ runner.os }}-${{ env.cache-name }}
61+
4262
- name: Use Node.js
4363
uses: actions/setup-node@v3
4464
with:

0 commit comments

Comments
 (0)