Skip to content

Commit b4c849f

Browse files
committed
CI: Ensure pnpm is installed before enabling setup-node pnpm cache (lint and site jobs)
1 parent 044d1ff commit b4c849f

File tree

2 files changed

+23
-8
lines changed

2 files changed

+23
-8
lines changed

.github/workflows/deploy-site.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,19 @@ jobs:
3939
uses: actions/setup-node@v4
4040
with:
4141
node-version: '20'
42-
cache: 'pnpm'
43-
cache-dependency-path: 'site/pnpm-lock.yaml'
4442

4543
- name: Setup pnpm
4644
uses: pnpm/action-setup@v4
4745
with:
4846
version: latest
4947

48+
- name: Enable pnpm cache
49+
uses: actions/setup-node@v4
50+
with:
51+
node-version: '20'
52+
cache: 'pnpm'
53+
cache-dependency-path: 'site/pnpm-lock.yaml'
54+
5055
- name: Install site dependencies
5156
run: |
5257
cd site && pnpm install --frozen-lockfile

.github/workflows/test.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,21 @@ jobs:
2525
uses: actions/setup-node@v4
2626
with:
2727
node-version: 20
28-
cache: pnpm
29-
cache-dependency-path: |
30-
pnpm-lock.yaml
31-
site/pnpm-lock.yaml
3228

3329
- name: Setup pnpm
3430
uses: pnpm/action-setup@v4
3531
with:
3632
version: latest
3733

34+
- name: Enable pnpm cache
35+
uses: actions/setup-node@v4
36+
with:
37+
node-version: 20
38+
cache: pnpm
39+
cache-dependency-path: |
40+
pnpm-lock.yaml
41+
site/pnpm-lock.yaml
42+
3843
- name: Install npm packages
3944
run: |
4045
# Install root and site pnpm dependencies
@@ -97,14 +102,19 @@ jobs:
97102
uses: actions/setup-node@v4
98103
with:
99104
node-version: 20
100-
cache: pnpm
101-
cache-dependency-path: site/pnpm-lock.yaml
102105

103106
- name: Setup pnpm
104107
uses: pnpm/action-setup@v4
105108
with:
106109
version: latest
107110

111+
- name: Enable pnpm cache (site)
112+
uses: actions/setup-node@v4
113+
with:
114+
node-version: 20
115+
cache: pnpm
116+
cache-dependency-path: site/pnpm-lock.yaml
117+
108118
- name: Install site dependencies
109119
run: cd site && pnpm install --frozen-lockfile
110120

0 commit comments

Comments
 (0)