diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 14dcfd9..9332713 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -7,7 +7,8 @@ on: - main env: - NODE_VERSION: lts/* + # NODE_VERSION: lts/* + CACHE-NAME: cache-node-modules jobs: deploy: @@ -21,14 +22,12 @@ jobs: - name: Cache node modules id: cache-npm uses: actions/cache@v3 - env: - cache-name: cache-node-modules with: # npm cache files are stored in `~/.npm` on Linux/macOS path: ~/.npm - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + key: ${{ runner.os }}-build-${{ env.CACHE-NAME }}-${{ hashFiles('**/package-lock.json') }} restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build-${{ env.CACHE-NAME }}- ${{ runner.os }}-build- ${{ runner.os }}- @@ -37,10 +36,13 @@ jobs: continue-on-error: true run: npm list - - uses: actions/setup-node@v3 - with: - node-version: ${{ env.NODE_VERSION }} - cache: "npm" + # Disable it because of extra unused work job + # The action has a built-in functionality for caching and restoring dependencies. + # It uses actions/cache under the hood for caching global packages data but requires less configuration settings. + # - uses: actions/setup-node@v3 + # with: + # node-version: ${{ env.NODE_VERSION }} + # cache: "npm" - name: Install Dependencies run: npm ci