Skip to content

Commit

Permalink
ci(fix): cache dir
Browse files Browse the repository at this point in the history
  • Loading branch information
dvgamerr committed Nov 6, 2024
1 parent e0e9d14 commit 8023f84
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,28 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'
cache: ${{ steps.detect-package-manager.outputs.manager }}

- name: Get npm store directory
- name: Get npm cache directory
id: npm-cache-dir
shell: bash
run: |
echo "STORE_PATH=$(npm store path --silent)" >> $GITHUB_ENV
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}

- uses: actions/cache@v4
name: Setup npm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-npm-store-${{ hashFiles('**/package-lock.json') }}
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-store-
${{ runner.os }}-node-
- name: Build 🔧
run: npm build
Expand Down

0 comments on commit 8023f84

Please sign in to comment.