File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change 12
12
13
13
env :
14
14
GA_ID : G-CTB8FQ7VMW
15
+ NODE_VERSION : ' 14'
15
16
16
17
steps :
17
18
- uses : actions/checkout@v2
@@ -21,20 +22,23 @@ jobs:
21
22
- name : Setup Node.js
22
23
uses : actions/setup-node@v1
23
24
with :
24
- node-version : ' 14 '
25
+ node-version : ${{ env.NODE_VERSION }}
25
26
26
- - name : Cache dependencies
27
+ - name : Get yarn cache directory path
28
+ id : yarn-cache-dir-path
29
+ run : echo "::set-output name=dir::$(yarn cache dir)"
30
+
31
+ - name : Handle yarn cache
27
32
uses : actions/cache@v2
28
33
id : yarn-cache
29
34
with :
30
- path : |
31
- **/node_modules
32
- key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
35
+ path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
36
+ key : ${{ runner.os }}-node-${{ env.NODE_VERSION }}-yarn-${{ hashFiles('**/yarn.lock') }}
33
37
restore-keys : |
34
- ${{ runner.os }}-yarn-
38
+ ${{ runner.os }}-node-${{ env.NODE_VERSION }}-yarn-
39
+ ${{ runner.os }}-node-
35
40
36
41
- name : Install dependencies
37
- if : steps.yarn-cache.outputs.cache-hit != 'true'
38
42
run : yarn --frozen-lockfile
39
43
40
44
- name : Copy and build
You can’t perform that action at this time.
0 commit comments