diff --git a/.github/deploy-production.sh b/.github/deploy-production.sh index 6633d62..abb9e62 100644 --- a/.github/deploy-production.sh +++ b/.github/deploy-production.sh @@ -6,7 +6,11 @@ set -euo pipefail # route. VERCEL_ORG_ID and VERCEL_PROJECT_ID select the project. : "${VERCEL_TOKEN:?Set VERCEL_TOKEN in the Production environment.}" : "${VERCEL_ORG_ID:?}" "${VERCEL_PROJECT_ID:?}" -vercel=(bunx --bun "vercel@58.8.0") +# Run the CLI under Node, not Bun. Under Bun, with no node_modules yet, the +# Next.js builder resolved `next` through Bun's auto-install cache instead of +# the project's locked copy, and Vercel could not read the cached files the +# build output then referenced. +vercel=(npx --yes "vercel@58.8.0") "${vercel[@]}" pull --yes --environment=production --token "$VERCEL_TOKEN" "${vercel[@]}" build --prod --token "$VERCEL_TOKEN" "${vercel[@]}" deploy --prebuilt --prod --token "$VERCEL_TOKEN" diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index 031a301..17340c1 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -67,6 +67,10 @@ jobs: - uses: actions/checkout@v4 with: persist-credentials: false + # The Vercel CLI runs under Node; Bun installs and builds the app. + - uses: actions/setup-node@v4 + with: + node-version: 24 - uses: oven-sh/setup-bun@v2 with: bun-version: 1.4.2 diff --git a/changelog.d/deploy-cli-under-node.fixed.md b/changelog.d/deploy-cli-under-node.fixed.md new file mode 100644 index 0000000..ccbafad --- /dev/null +++ b/changelog.d/deploy-cli-under-node.fixed.md @@ -0,0 +1 @@ +Deploy releases to Vercel production again: the deploy job now runs the Vercel CLI under Node. Under Bun, the build output referenced Bun's cache instead of the project's locked Next.js, so Vercel rejected the 0.2.0 deployment.