Improve caching logic of main workflow (#1274)
This commit is contained in:
parent
79dc067add
commit
b5dfcda451
1 changed files with 3 additions and 1 deletions
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
|
@ -19,13 +19,15 @@ jobs:
|
|||
cache: npm
|
||||
|
||||
- name: Cache Node modules
|
||||
id: cache-node-modules
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: test -d node_modules || npm ci
|
||||
if: steps.cache-node-modules.outputs.cache-hit != 'true'
|
||||
run: npm ci
|
||||
|
||||
- name: Cache setup
|
||||
uses: actions/cache@v2
|
||||
|
|
Loading…
Reference in a new issue