From 269f2f879644c0340678164d3cc0e06595af9e5b Mon Sep 17 00:00:00 2001 From: XieLe Date: Sun, 19 Nov 2023 15:12:30 +0800 Subject: [PATCH] init --- .github/workflows/gitbook-build.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gitbook-build.yml b/.github/workflows/gitbook-build.yml index 6bd63fa..2d4f882 100644 --- a/.github/workflows/gitbook-build.yml +++ b/.github/workflows/gitbook-build.yml @@ -26,6 +26,7 @@ jobs: - name: Cache Node.js modules uses: actions/cache@v3 + id: cache-npm with: path: ./node_modules key: Linux-node_modules-${{ hashFiles('./package-lock.json') }} @@ -35,7 +36,7 @@ jobs: with: node-version: '10.24.1' - - name: set COMMON_OLD_CACHE_KEY + - name: Set COMMON_OLD_CACHE_KEY run: echo "COMMON_OLD_CACHE_KEY=Linux-node_modules-${{ hashFiles('./package-lock.json') }}" >> $GITHUB_ENV - name: Install gitbook-cli @@ -60,6 +61,9 @@ jobs: else CHANGE_PACKAGE_VALUE=true fi + if [[ ${{ steps.cache-npm.outputs.cache-hit != 'true' }} ]]; then + CHANGE_PACKAGE_VALUE=true + fi echo "CHANGE_PACKAGE=${CHANGE_PACKAGE_VALUE}" >> $GITHUB_ENV - if: ${{ env.CHANGE_PACKAGE == true }}