From 51eb602f66c79eedc9afce20b71ab64dad5dd7c7 Mon Sep 17 00:00:00 2001 From: Armin Teimouri Date: Thu, 22 Oct 2026 20:42:41 +0300 Subject: [PATCH] ci: fail the preview step when wrangler fails The default run shell has no pipefail, so 'wrangler ... | tee' exited 0 and PR checks stayed green while the upload failed. Co-Authored-By: Claude Opus 5.5 (1M context) --- .github/workflows/deploy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9bda4e0..5b7a2e3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -42,6 +42,8 @@ jobs: - name: Upload preview if: github.event_name == 'pull_request' id: preview + # An explicit `shell: bash` adds -o pipefail, so tee cannot hide a wrangler failure + shell: bash run: | pnpm exec wrangler versions upload --preview-alias "pr-${{ github.event.pull_request.number }}" | tee upload.log url=$(grep -oE 'https://pr-[^ ]+\.workers\.dev' upload.log | head -1)