Skip to content

Commit e460097

Browse files
committed
Fix GitHub Actions workflow by adding pnpm setup and caching
1 parent 308a744 commit e460097

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

.github/workflows/main.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,25 @@ jobs:
3737
uses: actions/setup-node@v4
3838
with:
3939
node-version: lts/*
40-
cache: 'pnpm' # Set this to npm, yarn or pnpm.
40+
41+
- name: Install pnpm
42+
uses: pnpm/action-setup@v2
43+
with:
44+
version: latest
45+
46+
- name: Get pnpm store directory
47+
id: pnpm-cache
48+
shell: bash
49+
run: |
50+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
51+
52+
- name: Setup pnpm cache
53+
uses: actions/cache@v3
54+
with:
55+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
56+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
57+
restore-keys: |
58+
${{ runner.os }}-pnpm-store-
4159
4260
- name: install Rust stable
4361
uses: dtolnay/rust-toolchain@stable # Set this to dtolnay/rust-toolchain@nightly

0 commit comments

Comments
 (0)