Skip to content

Add deployment strategy configuration and GitHub Actions CI/CD workflows#8

Merged
jalexw merged 4 commits into
mainfrom
claude/add-deployment-cli-flag-KT6My
May 11, 2026
Merged

Add deployment strategy configuration and GitHub Actions CI/CD workflows#8
jalexw merged 4 commits into
mainfrom
claude/add-deployment-cli-flag-KT6My

Conversation

@jalexw

@jalexw jalexw commented May 11, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR adds support for configurable deployment strategies and scaffolds GitHub Actions CI/CD workflows during project initialization. Users can now choose between Vercel and no deployment strategy, with corresponding workflow files and configuration generated automatically.

Key Changes

  • Deployment Strategy Configuration: Added --deployment CLI option supporting "vercel" or "none" strategies with interactive prompts for user input
  • GitHub Actions Workflows:
    • Created ci.yml workflow that runs build, typecheck, and conditionally deploys to Vercel on main branch pushes
    • Created migrate-production.yml reusable workflow for running database migrations with production secrets
  • Vercel Integration:
    • Added vercel.json configuration file generation when Vercel deployment is selected
    • Configured with Next.js framework, bun package manager, and proper build/output settings
  • Scaffold Updates: Extended scaffold() function to generate .github/workflows/ directory and deployment-specific files
  • Test Coverage: Updated test script to validate new workflow files and deployment configuration

Implementation Details

  • Deployment strategy is validated using Zod schema (z.enum(["vercel", "none"]))
  • CI workflow conditionally includes publish-to-vercel job only when deployment strategy is "vercel"
  • Workflows use Bun package manager and Node.js 24
  • Production migrations workflow accepts secrets via workflow_call for reusability
  • Vercel deployment job runs only on pushes to main branch and depends on successful build job

https://claude.ai/code/session_013iTwmsSWk3jF7u5XZWEQkV

claude added 4 commits May 11, 2026 18:52
Introduces a --deployment <vercel|none> flag (with an interactive prompt
fallback) so scaffolded projects get their CI/CD wired up at creation
time. Always emits .github/workflows/ci.yml and migrate-production.yml,
and additionally writes vercel.json plus a publish-to-vercel job when
the strategy is "vercel". The CI workflow triggers on PRs and pushes to
main/feature/*/claude/*/fix/*, and the publish/migrate jobs are gated to
pushes on main.
Parameterizes scripts/test.sh to take the deployment strategy as an
argument (default 'vercel') and adds branch-specific assertions for
vercel.json and the publish-to-vercel CI job. Runs the matrix [vercel,
none] in the CLI's own CI so both code paths are exercised on every
push.
@jalexw jalexw merged commit 6db1abf into main May 11, 2026
3 checks passed
@jalexw jalexw deleted the claude/add-deployment-cli-flag-KT6My branch May 11, 2026 20:06
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