Skip to content

Commit 01bd099

Browse files
committed
ci: install pnpm in GitHub Actions workflows
1 parent 80cc901 commit 01bd099

2 files changed

Lines changed: 28 additions & 10 deletions

File tree

.github/workflows/ci.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,26 @@ jobs:
1616
- name: Checkout
1717
uses: actions/checkout@v5
1818

19+
- name: Setup Node
20+
uses: actions/setup-node@v5
21+
with:
22+
node-version: 22
23+
1924
- name: Setup pnpm
2025
uses: pnpm/action-setup@v4
2126
with:
2227
version: 11.5.0
2328

24-
- name: Setup Node
25-
uses: actions/setup-node@v5
29+
- name: Get pnpm store path
30+
run: echo "PNPM_STORE_PATH=$(pnpm store path --silent)" >> "$GITHUB_ENV"
31+
32+
- name: Restore pnpm cache
33+
uses: actions/cache@v4
2634
with:
27-
node-version: 22
28-
cache: pnpm
29-
cache-dependency-path: pnpm-lock.yaml
35+
path: ${{ env.PNPM_STORE_PATH }}
36+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
37+
restore-keys: |
38+
${{ runner.os }}-pnpm-store-
3039
3140
- name: Install dependencies
3241
run: pnpm install --frozen-lockfile

.github/workflows/deploy-pages.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,26 @@ jobs:
2424
- name: Checkout
2525
uses: actions/checkout@v5
2626

27+
- name: Setup Node
28+
uses: actions/setup-node@v5
29+
with:
30+
node-version: 22
31+
2732
- name: Setup pnpm
2833
uses: pnpm/action-setup@v4
2934
with:
3035
version: 11.5.0
3136

32-
- name: Setup Node
33-
uses: actions/setup-node@v5
37+
- name: Get pnpm store path
38+
run: echo "PNPM_STORE_PATH=$(pnpm store path --silent)" >> "$GITHUB_ENV"
39+
40+
- name: Restore pnpm cache
41+
uses: actions/cache@v4
3442
with:
35-
node-version: 22
36-
cache: pnpm
37-
cache-dependency-path: pnpm-lock.yaml
43+
path: ${{ env.PNPM_STORE_PATH }}
44+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
45+
restore-keys: |
46+
${{ runner.os }}-pnpm-store-
3847
3948
- name: Install dependencies
4049
run: pnpm install --frozen-lockfile

0 commit comments

Comments
 (0)