21
21
uses : actions/setup-node@v2
22
22
with :
23
23
node-version : ${{ matrix.node-version }}
24
-
25
- - name : Get yarn cache directory path
26
- id : yarn-cache-dir-path
27
- run : echo "::set-output name=dir::$(yarn cache dir)"
28
-
29
- - uses : actions/cache@v2
30
- id : yarn-cache
31
- with :
32
- path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
33
- key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
34
- restore-keys : |
35
- ${{ runner.os }}-yarn-
24
+ cache : yarn
36
25
37
26
- run : yarn --frozen-lockfile
38
27
- run : yarn lint:js
@@ -68,29 +57,10 @@ jobs:
68
57
uses : actions/setup-node@v2
69
58
with :
70
59
node-version : ${{ matrix.node-version }}
71
-
72
- - name : Get yarn cache directory path
73
- id : yarn-cache-dir-path
74
- run : echo "::set-output name=dir::$(yarn cache dir)"
75
-
76
- - uses : actions/cache@v2
77
- id : yarn-cache
78
- with :
79
- path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
80
- key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
81
- restore-keys : |
82
- ${{ runner.os }}-yarn-
60
+ cache : yarn
83
61
84
62
- run : yarn
85
63
86
- - uses : actions/cache@v2
87
- id : build-cache
88
- with :
89
- path : .cache
90
- key : build-${{ hashFiles('webpack.*.js') }}-${{ hashFiles('**/yarn.lock') }}
91
- restore-keys : |
92
- build-${{ hashFiles('webpack.*.js') }}-
93
-
94
64
- name : Build site
95
65
run : yarn build
96
66
env :
@@ -108,29 +78,10 @@ jobs:
108
78
- uses : actions/checkout@v2
109
79
110
80
- name : Use Node.js ${{ matrix.node-version }}
111
- uses : actions/setup-node@v1
81
+ uses : actions/setup-node@v2
112
82
with :
113
83
node-version : ${{ matrix.node-version }}
114
-
115
- - name : Get yarn cache directory path
116
- id : yarn-cache-dir-path
117
- run : echo "::set-output name=dir::$(yarn cache dir)"
118
-
119
- - uses : actions/cache@v2
120
- id : yarn-cache
121
- with :
122
- path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
123
- key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
124
- restore-keys : |
125
- ${{ runner.os }}-yarn-
126
-
127
- - uses : actions/cache@v2
128
- id : build-cache
129
- with :
130
- path : .cache
131
- key : build-e2e-${{ hashFiles('webpack.*.js') }}-${{ hashFiles('**/yarn.lock') }}
132
- restore-keys : |
133
- build-e2e-${{ hashFiles('webpack.*.js') }}-
84
+ cache : yarn
134
85
135
86
- run : |
136
87
yarn
0 commit comments