File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -78,22 +78,25 @@ jobs:
78
78
if : matrix.os == 'windows-latest'
79
79
run : npm i -g npm
80
80
81
+ - name : Get npm cache directory
82
+ id : npm-cache-dir
83
+ run : |
84
+ echo "::set-output name=dir::$(npm config get cache)"
85
+
81
86
- name : Cache Node.js modules
82
87
id : cache
83
88
uses : actions/cache@v2
84
89
with :
85
- # npm cache files are stored in `~/.npm` on Linux/macOS
86
- path : ~/.npm
87
- key : ${{ runner.OS }}-${{ matrix.node-version }}-${{ matrix.webpack-version }}-${{ hashFiles('**/package-lock.json') }}
90
+ path : ${{ steps.npm-cache-dir.outputs.dir }}
91
+ key : ${{ runner.os }}-${{ matrix.webpack-version }}-node-${{ hashFiles('**/package-lock.json') }}
88
92
restore-keys : |
89
- ${{ runner.OS }}-${{ matrix.node-version }}-${{ matrix.webpack-version }}-
90
- ${{ runner.OS }}-
93
+ ${{ runner.os }}-${{ matrix.webpack-version }}-node-
91
94
92
95
- name : Install dependencies
93
- if : steps.cache.outputs.cache-hit != 'true'
94
96
run : npm ci
95
97
96
98
- name : Install webpack ${{ matrix.webpack-version }}
99
+ if : matrix.webpack-version == '4'
97
100
run : npm i webpack@${{ matrix.webpack-version }}
98
101
99
102
- name : Link webpack-dev-server
You can’t perform that action at this time.
0 commit comments