From f5ca97a3ffe2f48053f1e21affc4a74f10838463 Mon Sep 17 00:00:00 2001 From: Link Date: Sat, 19 Dec 2020 16:15:21 +0800 Subject: [PATCH] test: github action cache node_modules --- .github/workflows/deploy.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2c6de43a..c9fdd847 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -66,6 +66,7 @@ jobs: node-version: 12 - name: Load node_modules + id: cache-node-modules uses: actions/cache@v2 with: path: | @@ -73,8 +74,8 @@ jobs: */*/node_modules key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} - - name: install dependencies - run: yarn install --prefer-offline + - run: yarn install + if: steps.cache-node-modules.outputs.cache-hit != 'true' - name: lint run: yarn lint