add cache for node_modules
This commit is contained in:
parent
775e6d909f
commit
2ee45905e9
14
.github/workflows/update-release-v1.yml
vendored
14
.github/workflows/update-release-v1.yml
vendored
@ -29,6 +29,20 @@ jobs:
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'npm'
|
||||
|
||||
- name: Cache node modules
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
# npm cache files are stored in `~/.npm` on Linux/macOS
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-build-
|
||||
${{ runner.os }}-
|
||||
|
||||
- run: npm ci
|
||||
- run: npm run build --if-present
|
||||
- run: zip build.zip $(find build)
|
||||
|
Loading…
x
Reference in New Issue
Block a user