Skip to content

deploy: pin Node versions, fix OpenNext bun build, broaden path filter#2

Merged
PolGuixe merged 3 commits into
mainfrom
staging
Jun 3, 2026
Merged

deploy: pin Node versions, fix OpenNext bun build, broaden path filter#2
PolGuixe merged 3 commits into
mainfrom
staging

Conversation

@PolGuixe

@PolGuixe PolGuixe commented Jun 3, 2026

Copy link
Copy Markdown
Member

Brings staging-tested deploy fixes into main so production deploys work.

Fixes

  • backend/package.json: pin engines.node ">=20" so Nixpacks installs Node 20 (default was Node 18, now EOL on Railway).
  • .github/workflows/ci-cd.yml:
    • deploy-frontend now uses Node 22 (Wrangler 4.x requirement).
    • Install bun in deploy-frontend so OpenNext's bun-via-bun.lock invocation works.
    • Path filter matches .github/workflows/** in both backend and frontend filters, so a workflow change triggers both deploys.

Verified on staging

  • Backend: https://backend-staging-41ef.up.railway.app/health{"ok":true}
  • Frontend: https://mike-frontend-staging.origen.workers.dev → 307 redirect, title "Mike - AI Legal Platform"

On merge, the production deploys will pause at the required-reviewer gate (your approval).

🤖 Generated with Claude Code

PolGuixe and others added 3 commits June 3, 2026 00:00
Two bootstrap fixes after first deploy attempt:

- backend/package.json: add engines.node ">=20" so Nixpacks installs Node 20
  on Railway instead of the default 18 (which is EOL and was removed).
- .github/workflows/ci-cd.yml: install bun in deploy-frontend before the
  OpenNext build. OpenNext detects frontend/bun.lock and invokes `bun run
  build`, which fails on a runner with only Node installed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Wrangler 4.x requires Node ≥22.0.0; the deploy-frontend job was on Node 20
and failed at the deploy step. ci-frontend stays on Node 20 (only used for
typecheck/build, not wrangler).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Path-filter now matches .github/workflows/** in both backend and frontend
filters. Means a workflow-only edit redeploys both packages — which is the
right default given any workflow change can affect either deploy.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@PolGuixe PolGuixe merged commit e5a0d5b into main Jun 3, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant