Skip to content

Commit f32e1f6

Browse files
hotlongCopilot
andcommitted
fix(deploy): pnpm install before wrangler deploy
Wrangler bundles cloudflare/worker.ts which imports @cloudflare/containers from workspace node_modules. Without pnpm install the bundle fails: Could not resolve '@cloudflare/containers' Add pnpm + node setup + frozen lockfile install in both cloud and objectos jobs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 045322e commit f32e1f6

1 file changed

Lines changed: 28 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,22 @@ jobs:
122122
fetch-depth: 0
123123
token: ${{ secrets.GITHUB_TOKEN }}
124124

125+
- name: Set up pnpm
126+
uses: pnpm/action-setup@v4
127+
with:
128+
version: 10
129+
130+
- name: Set up Node
131+
uses: actions/setup-node@v4
132+
with:
133+
node-version: 20
134+
cache: pnpm
135+
136+
- name: Install workspace deps (for wrangler bundle)
137+
run: pnpm install --frozen-lockfile --prefer-offline
138+
125139
- name: Set up Docker Buildx
126140
uses: docker/setup-buildx-action@v3
127-
128-
- name: Build cloud image (local)
129141
uses: docker/build-push-action@v6
130142
with:
131143
context: .
@@ -210,6 +222,20 @@ jobs:
210222
fetch-depth: 0
211223
token: ${{ secrets.GITHUB_TOKEN }}
212224

225+
- name: Set up pnpm
226+
uses: pnpm/action-setup@v4
227+
with:
228+
version: 10
229+
230+
- name: Set up Node
231+
uses: actions/setup-node@v4
232+
with:
233+
node-version: 20
234+
cache: pnpm
235+
236+
- name: Install workspace deps (for wrangler bundle)
237+
run: pnpm install --frozen-lockfile --prefer-offline
238+
213239
- name: Set up Docker Buildx
214240
uses: docker/setup-buildx-action@v3
215241

0 commit comments

Comments
 (0)