Summary
Implement preview deployments so each git branch/PR gets its own unique URL, similar to Vercel's preview system.
Expected Behavior
# On branch "feature/new-homepage"
nextdeploy ship --preview
# Deploys to: feature-new-homepage.myapp.nextdeploy.app
# Or: preview-abc123.d1234.cloudfront.net
Design Options
- Lambda aliases — Create a Lambda alias per branch, route via CloudFront behavior
- Separate Lambda functions —
<app>-preview-<branch> with separate Function URLs
- Path-based — Single Lambda with branch routing via header/path
Required Components
- Branch name detection from git
- Unique subdomain or path generation
- Separate S3 prefix for preview assets
- Cleanup mechanism for stale previews
Commands
nextdeploy ship --preview # Deploy current branch as preview
nextdeploy preview list # List active previews
nextdeploy preview delete <branch> # Delete a preview
Difficulty: Hard · Language: Go
Summary
Implement preview deployments so each git branch/PR gets its own unique URL, similar to Vercel's preview system.
Expected Behavior
Design Options
<app>-preview-<branch>with separate Function URLsRequired Components
Commands
Difficulty: Hard · Language: Go