Skip to content

feat(deploy-vercel): implement real CLI-backed vercel integration#229

Open
emil07770 wants to merge 1 commit into
profullstack:masterfrom
emil07770:feat/deploy-vercel-cli-integration
Open

feat(deploy-vercel): implement real CLI-backed vercel integration#229
emil07770 wants to merge 1 commit into
profullstack:masterfrom
emil07770:feat/deploy-vercel-cli-integration

Conversation

@emil07770
Copy link
Copy Markdown
Contributor

Summary

  • Replace stub build() and ship() with real exec() calls to the Vercel CLI
  • build(): runs vercel build (with --prod when config.prod is set or channel is stable)
  • ship(): runs vercel deploy --token <token> (with --prod on stable); passes token via both CLI flag and env var
  • Reads token via ctx.secret('VERCEL_TOKEN'), throws descriptive error if missing
  • Short-circuits on ctx.dryRun in ship()
  • Parses deployment URL from vercel stdout (https://*.vercel.app)
  • Passes cwd: ctx.projectDir and env: { VERCEL_TOKEN } to exec for proper isolation

Test plan

  • Set VERCEL_TOKEN secret: sh1pt secret set VERCEL_TOKEN <token>
  • Dry-run: sh1pt ship deploy-vercel --dry-run should return { id: 'dry-run' } without calling vercel
  • Build: sh1pt build deploy-vercel should invoke vercel build
  • Full deploy: sh1pt ship deploy-vercel should invoke vercel deploy --token <token> and return { id, url }
  • Prod deploy: with prod: true or channel: stable, should add --prod flag
  • Missing token: should throw with helpful message pointing to sh1pt secret set VERCEL_TOKEN

🤖 Generated with Claude Code

Replace stub with actual exec() calls to the Vercel CLI for build and ship.
- build(): runs `vercel build` (with `--prod` when on stable channel)
- ship(): runs `vercel deploy --token <token>` (with `--prod` on stable)
- Reads token via ctx.secret('VERCEL_TOKEN'), throws descriptive error if missing
- Short-circuits on ctx.dryRun in ship()
- Parses deployment URL from vercel stdout (https://*.vercel.app)
- Passes cwd and env to exec for proper isolation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ralyodio
Copy link
Copy Markdown
Contributor

Heads up — the failing vu1nz security scan check needs a workflow fix that's on master (commit b3290b8). I tried to update this branch automatically but hit merge conflicts. Could you rebase/merge master locally, resolve conflicts, and force-push? Once that's in, the CI check will go green. Thanks!

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.

2 participants