Skip to content

Commit 6ea0d9f

Browse files
committed
fix: cache ci
1 parent 1773bdb commit 6ea0d9f

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,20 @@ jobs:
2323
- uses: actions/checkout@v1
2424
- uses: actions/cache@v1
2525
id: cache
26+
if: matrix.os != 'windows'
2627
with:
2728
path: ~/.npm
2829
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles('**/package-lock.json') }}
30+
- name: Get npm cache directory
31+
id: npm-cache
32+
if: matrix.os == 'windows'
33+
run: |
34+
echo "::set-output name=dir::$(npm config get cache)"
35+
- uses: actions/cache@v2
36+
if: matrix.os == 'windows'
37+
with:
38+
path: ${{ steps.npm-cache.outputs.dir }}
39+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
2940
- name: Install dependencies
3041
run: npm install
3142

0 commit comments

Comments
 (0)