Document a clean migration strategy for delivering both stable and overhaul UI versions from one repository without adding runtime feature flags to application code.
Build two versions of the site during deployment and publish both under one GitHub Pages branch.
- Stable site at root path: /index.html
- Overhaul site at next path: /next/index.html
The URL path acts as the switch.
- Stable: /develop/
- Overhaul: /develop/next/
- Keeps runtime code clean.
- Avoids pervasive if version checks in app modules.
- Allows side-by-side validation of stable and next UX.
- Reduces long-term cleanup work versus in-app toggles.
Publish a combined artifact to the GitHub Pages branch with this shape:
- /index.html and root assets from stable branch build
- /next/index.html and next assets from overhaul branch build
A deployment workflow builds both branches in one run and publishes one artifact.
- Checkout stable branch into an isolated worktree directory.
- Install dependencies and build stable output.
- Copy stable output into publish root.
- Checkout overhaul branch into a second isolated worktree directory.
- Install dependencies and build overhaul output.
- Copy overhaul output into publish root under /next.
- Deploy combined publish folder to GitHub Pages.
- Run both builds in isolated directories to prevent cross-branch contamination.
- Keep Node and npm versions pinned consistently in CI.
- Use workflow concurrency to cancel outdated deploy jobs.
- Use relative asset URLs so content works under both root and /next paths.
- Fail the deploy if either build fails.
- main branch represents stable production UX.
- overhaul branch represents next-generation UX.
- Deploy workflow may trigger on pushes to either branch, but each run should still build both branches for a consistent dual-output artifact.
This strategy complements the multi-tab and local workspace migration by separating rollout concerns from runtime logic.
- Runtime implementation remains modular and focused on architecture.
- Deployment controls the exposure of stable versus next.
Pros:
- Cleaner codebase during migration.
- Lower risk of runtime toggle regressions.
- Clear QA and stakeholder review URLs.
Cons:
- Longer deploy times due to dual builds.
- More CI configuration complexity.
- Temporary branch coordination requirements.
After next UI is production-ready:
- Promote next code into main.
- Remove dual-build deployment logic.
- Publish only root output again.
- Remove migration-only docs and branch conventions.
- Add a deploy workflow implementation doc with exact GitHub Actions YAML and permissions.
- Add a release checklist for validating both URLs before each deploy.
- Add ownership notes for stable and next branch review responsibilities.