docs: use setup-node cache-dependency-path (#602)

This commit is contained in:
Sardorbek Imomaliev 2022-08-27 16:15:37 +05:00 committed by GitHub
parent 11bede66e7
commit 46553eae11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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