chore: retire next branch, main now drives staging deploys (CPL-272)#312
chore: retire next branch, main now drives staging deploys (CPL-272)#312
Conversation
Removes the next branch from deploy triggers and retires the chipotle-dev staging target. Main now deploys to chipotle-next / lit-static-next (inheriting the old next-branch behavior). Production deploys remain tag-driven via v* tags. - deploy-staging.yml, deploy-static.yml: trigger only on main; drop chipotle-dev and lit-static-dev paths; always use Stripe sandbox keys - phala-simulator, k6-client-check, contract-bindings-check, k6-smoke, k6-correctness, manual_contract-upgrade: branch/ref references switched from next to main - NodeConfig: consolidate next.toml into main.toml (chipotle-next contract); delete NodeConfig.next.toml - Dockerfile, Dockerfile.lit-api-server, justfile, justfile.sim: default NODE_CONFIG and branch-conditional lookups updated to main Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Migrates the repo’s deployment/CI branch flow so that main replaces the retired next branch as the staging deploy trigger, while keeping production deploys tag-driven (v*).
Changes:
- Update GitHub Actions workflows to trigger staging/static deploys and several checks from
mainonly. - Retire
NodeConfig.next.tomlby moving its contract address intoNodeConfig.main.toml, and update Docker/just scripts to default toNodeConfig.main.toml. - Simplify local/CI scripts that previously branched on
mainvsnext.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
lit-api-server/NodeConfig.next.toml |
Removes the retired next node config. |
lit-api-server/NodeConfig.main.toml |
Updates main config to use the former next contract address. |
justfile.sim |
Always copies NodeConfig.main.toml into the gitignored NodeConfig.toml. |
justfile |
Removes branch-conditional deploy vars; hard-codes staging target values. |
Dockerfile.lit-api-server |
Defaults NODE_CONFIG build arg to NodeConfig.main.toml. |
Dockerfile |
Defaults NODE_CONFIG build arg to NodeConfig.main.toml. |
.github/workflows/phala-simulator.yml |
Runs on main only; always uses NodeConfig.main.toml. |
.github/workflows/k6-smoke.yml |
Switches “next-vs-dev” selection logic to key off main. |
.github/workflows/k6-correctness.yml |
Switches “next-vs-dev” selection logic to key off main. |
.github/workflows/k6-client-check.yml |
Removes next from push trigger branches. |
.github/workflows/deploy-static.yml |
Removes next push trigger; points deploys at lit-static-next. |
.github/workflows/deploy-staging.yml |
Removes next push trigger; staging deploy target becomes chipotle-next; always uses Stripe sandbox keys. |
.github/workflows/contract-bindings-check.yml |
Removes next from push trigger branches. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| branches: [main] | ||
| paths: | ||
| - 'lit-static/**' | ||
| - '.github/workflows/deploy-static.yml' |
There was a problem hiding this comment.
deploy-preview is gated on github.event_name == 'pull_request', but this workflow is only triggered by push events. As a result, PR preview deployments will never run. Add a pull_request trigger (and optionally restrict paths) or remove the preview job/condition if previews are no longer intended.
| - '.github/workflows/deploy-static.yml' | |
| - '.github/workflows/deploy-static.yml' | |
| pull_request: | |
| paths: | |
| - 'lit-static/**' | |
| - '.github/workflows/deploy-static.yml' |
| contract_address = "0x98e501fab2d60a5119a185e1563f10cb54bc6068" | ||
|
|
||
| # contract_address = "0x6c4989c3c2aab271444b4b7b4ec3aca6da1bf1e5" # old contracts, TODO: about 10 USD still sitting in api-payer signers |
There was a problem hiding this comment.
With NodeConfig.next.toml removed/retired, there are still repo references to it (e.g. manual_contract-upgrade.yml offers a next option that maps to lit-api-server/NodeConfig.next.toml). This will cause that workflow to fail when next is selected unless the workflow is updated or an alias config file is kept.
| node_config := `git branch --show-current | xargs -I {} sh -c '[ "{}" = "main" ] && echo NodeConfig.main.toml || echo NodeConfig.next.toml'` | ||
| domain := `git branch --show-current | xargs -I {} sh -c '[ "{}" = "main" ] && echo api.dev.litprotocol.com || echo test.chipotle.litprotocol.com'` | ||
| # main → chipotle-next (override with PHALA_APP_NAME) | ||
| app_name := 'chipotle-next' |
There was a problem hiding this comment.
The comment says "override with PHALA_APP_NAME", but app_name is currently hard-coded and does not read PHALA_APP_NAME from the environment. Either wire app_name to env('PHALA_APP_NAME', ...) (or document the actual override mechanism, e.g. passing app_name=.../deploy name=... to just).
| app_name := 'chipotle-next' | |
| app_name := env('PHALA_APP_NAME', 'chipotle-next') |
Summary
Linear: CPL-272
Implements the branch-flow migration from CPL-272. The
nextbranch is retired as a deploy trigger;mainnow drives staging deploys. Production stays tag-driven (v*→deploy-prod-1-propose.yml).Effect per user decision:
mainpush →chipotle-next(Phala) +lit-static-next(Cloudflare Pages)chipotle-dev/lit-static-devare retired — dev no longer gets deployedv*tag → production (unchanged)Deployment workflows
deploy-staging.yml: triggers only onmain; deploys tochipotle-next; Stripe always uses sandbox keysdeploy-static.yml: triggers only onmain; deploys tolit-static-nextwithtest.chipotle.litprotocol.com; PR preview repointed fromlit-static-dev→lit-static-nextCI/check workflows (next → main rename)
phala-simulator.yml,k6-client-check.yml,contract-bindings-check.yml:[main, next]→[main]k6-smoke.yml,k6-correctness.yml:github.ref_name == 'next'→'main'manual_contract-upgrade.yml: intentionally left unchanged (user reverted)Supporting files
NodeConfig.main.toml: contents replaced with the formernextconfig (chipotle-next contract0x98e5...)NodeConfig.next.toml: deletedDockerfile,Dockerfile.lit-api-server: defaultNODE_CONFIG→NodeConfig.main.tomljustfile,justfile.sim: branch-conditional lookups collapsed tomain-onlyTest plan
maintriggers deploy-staging →chipotle-next(notchipotle-dev)maintriggers deploy-static →lit-static-nextv*tag still triggersdeploy-prod-1-propose.yml(no regression)manual_contract-upgradeworkflow still runs (it was intentionally reverted — note: it references deletedNodeConfig.next.tomlwhennextis selected; follow-up may be needed)Known follow-ups (not in this PR)
manual_contract-upgrade.ymlstill offers anextbranch choice butNodeConfig.next.tomlis deleted — selectingnextwill fail until that workflow is reconciledk6/data/accounts.next.jsonandk6/justfilestill usenextnaming internally — not touched per scope🤖 Generated with Claude Code