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 - 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