From 46553eae11dc4ca2d07de9f176dc4fa4c2c50c10 Mon Sep 17 00:00:00 2001 From: Sardorbek Imomaliev Date: Sat, 27 Aug 2022 16:15:37 +0500 Subject: [PATCH] docs: use setup-node cache-dependency-path (#602) --- README.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 380b00c..e231ed5 100644 --- a/README.md +++ b/README.md @@ -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