use setup-node's own cache directive instead of separate action

This commit is contained in:
Sardorbek Imomaliev 2022-08-27 18:04:35 +07:00
parent 11bede66e7
commit 2bf1f9189a

View file

@ -263,15 +263,13 @@ jobs:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v3 uses: actions/setup-node@v3
with: with:
node-version: '14' node-version: '16'
cache: 'npm'
- name: Cache dependencies # The action defaults to search for the dependency file (package-lock.json,
uses: actions/cache@v2 # npm-shrinkwrap.json or yarn.lock) in the repository root, and uses its
with: # hash as a part of the cache key.
path: ~/.npm # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-data
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} cache-dependency-path: '**/package-lock.json'
restore-keys: |
${{ runner.os }}-node-
- run: npm ci - run: npm ci
- run: hugo --minify - run: hugo --minify