Skip to content

ci(relay): deploy only when the relay or its dependencies change - #652

Merged
incognitojam merged 2 commits into
mainfrom
fix/relay-deploy-path-filter
Oct 7, 2026
Merged

incognitojam merged 2 commits into
mainfrom
fix/relay-deploy-path-filter

Conversation

@incognitojam

Copy link
Copy Markdown
Owner

deploy-relay.yml deployed both the production and development relay on every push to main, including commits like #650 that only touch the fork ledger. Each run installs dependencies and runs Alchemy against production with the production secrets, and all runs share one concurrency group, so a backlog of unrelated merges queues behind any slow or stuck deploy.

The workflow now starts with the same changed-since-last-deploy check that deploy-web.yml and mobile-eas-production.yml use. Both relay stages deploy only when something changed since the last successful relay deploy under:

  • infra/relay
  • the relay's workspace dependencies: packages/client-runtime, packages/contracts, packages/shared
  • patches, the root package.json, pnpm-lock.yaml, pnpm-workspace.yaml
  • the workflow itself and the change-detection action

Because the check compares against the last successful deploy rather than a single push, changes from a failed, cancelled, or replaced run still deploy on the next run.

Before this change, a variable or secret change was picked up by the next unrelated merge. That no longer happens, so the workflow gains workflow_dispatch to redeploy by hand. Manual runs are limited to main, as upstream's relay workflow does, so a run from another branch can't deploy that branch to production. The relay README and the two operations docs that said "every push to main" are updated.

Validation

I ran the same git diff --quiet pathspec check the action runs over the last 15 commits on main. Two would deploy: #647 and #648, which both touch packages/client-runtime. The other 13 skip, including #650. Comparing the relay's last successful deploy before today (c45862b737) with current main reports packages/client-runtime changes, which matches the infrastructure changes the deploy for 7fa76362f8 applied after the stuck run was cancelled.

The workflow YAML parses. The new jobs haven't run on GitHub yet; the first push to main after merge will exercise them, since the change to the workflow file itself counts as a relay change.


Written by an agent (Claude Code, claude-opus-5-5).

Adds the changed-since-last-deploy check that the web and mobile deploys
already use, so commits that don't touch the relay, its workspace packages,
or the lockfile no longer redeploy both relay stages. A manual run on main
redeploys after a variable or secret change.
@github-actions github-actions Bot added the size:M label Oct 7, 2026
@incognitojam
incognitojam enabled auto-merge (squash) October 7, 2026 11:39
@incognitojam
incognitojam merged commit 2558088 into main Oct 7, 2026
23 checks passed
@incognitojam
incognitojam deleted the fix/relay-deploy-path-filter branch October 7, 2026 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant