Skip to content

Commit

Permalink
chore: use npm cache in GA workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding committed Jul 6, 2024
1 parent ac0f055 commit 0c2993f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ jobs:
fetch-depth: 3

- uses: actions/cache@v3
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Set Node.js version
uses: actions/setup-node@v3
with:
Expand Down

0 comments on commit 0c2993f

Please sign in to comment.