Automated CI/CD pipeline setup using GitHub Actions with automatic secret configuration via GitHub CLI. Generates platform-specific workflows (Vercel, DigitalOcean, Railway) and configures repository secrets automatically. Use when setting up continuous deployment, configuring GitHub Actions, automating deployments, or when user mentions CI/CD, GitHub Actions, automated deployment, or pipeline setup.
Limited to specific tools
Additional assets for this skill
This skill is limited to using the following tools:
README.mdexamples/vercel-setup.mdscripts/configure-github-secrets.shscripts/extract-platform-ids.shscripts/generate-workflow.shscripts/setup-cicd.shtemplates/vercel-workflow.ymlThis skill provides fully automated CI/CD pipeline setup for any deployment platform using GitHub Actions and the GitHub CLI (gh) to configure secrets automatically.
Core Philosophy: CI/CD setup should be one command - no manual secret configuration, no copy-pasting tokens, no visiting GitHub web UI.
Key Features:
gh CLIScript: scripts/setup-cicd.sh <platform> [project-path]
Purpose: One-command CI/CD setup - detects project, extracts IDs, configures secrets, generates workflow
Actions:
gh CLI.github/workflows/deploy.ymlUsage:
# Auto-detect platform and set up CI/CD
./scripts/setup-cicd.sh auto
# Set up Vercel CI/CD
./scripts/setup-cicd.sh vercel
# Set up DigitalOcean App Platform CI/CD
./scripts/setup-cicd.sh digitalocean-app
# Set up DigitalOcean Droplet CI/CD
./scripts/setup-cicd.sh digitalocean-droplet
# Set up with custom path
./scripts/setup-cicd.sh vercel /path/to/project
# Dry run (show what would be configured)
DRY_RUN=true ./scripts/setup-cicd.sh vercel
Required Environment Variables (must be set before running):
VERCEL_TOKENDIGITALOCEAN_ACCESS_TOKENRAILWAY_TOKENNETLIFY_AUTH_TOKENCLOUDFLARE_API_TOKENExit Codes:
0: CI/CD setup successful1: Setup failed2: Missing prerequisites (gh CLI, platform CLI, tokens)Script: scripts/configure-github-secrets.sh <platform> <project-path>
Purpose: Automatically configure GitHub repository secrets using gh CLI
Actions:
gh CLI is authenticatedgh secret setUsage:
# Configure Vercel secrets
./scripts/configure-github-secrets.sh vercel .
# Configure DigitalOcean secrets
./scripts/configure-github-secrets.sh digitalocean /path/to/app
# List current secrets
gh secret list
# Verify secret was set
gh secret list | grep VERCEL_TOKEN
Secrets Configured by Platform:
Vercel:
VERCEL_TOKEN - From environment variableVERCEL_ORG_ID - Extracted from .vercel/project.jsonVERCEL_PROJECT_ID - Extracted from .vercel/project.jsonDigitalOcean App Platform:
DIGITALOCEAN_ACCESS_TOKEN - From environment variableDO_APP_ID - Extracted from app spec or doctlDO_APP_NAME - From project configurationDigitalOcean Droplets:
DIGITALOCEAN_ACCESS_TOKEN - From environment variableDROPLET_ID - From deployment metadataSSH_PRIVATE_KEY - From ~/.ssh/id_rsa or specified pathRailway:
RAILWAY_TOKEN - From environment variableRAILWAY_PROJECT_ID - Extracted from railway.jsonRAILWAY_SERVICE_ID - From railway statusExit Codes:
0: Secrets configured successfully1: Configuration failed2: Missing gh CLI or not authenticatedScript: scripts/extract-platform-ids.sh <platform> <project-path>
Purpose: Extract platform-specific project IDs automatically
Actions:
Usage:
# Extract Vercel IDs
./scripts/extract-platform-ids.sh vercel .
# Extract DigitalOcean App IDs
./scripts/extract-platform-ids.sh digitalocean-app /path/to/app
# Save to file
./scripts/extract-platform-ids.sh vercel . > project-ids.json
Output Format:
{
"platform": "vercel",
"orgId": "team_abc123",
"projectId": "prj_xyz789",
"projectName": "my-app",
"extracted_from": ".vercel/project.json",
"timestamp": "2025-01-02T12:34:56Z"
}
Exit Codes:
0: IDs extracted successfully1: Extraction failed2: Platform not linkedScript: scripts/generate-workflow.sh <platform> <output-path>
Purpose: Generate platform-specific GitHub Actions workflow
Actions:
.github/workflows/deploy.ymlUsage:
# Generate Vercel workflow
./scripts/generate-workflow.sh vercel .github/workflows/deploy.yml
# Generate DigitalOcean App Platform workflow
./scripts/generate-workflow.sh digitalocean-app .github/workflows/deploy.yml
# Preview without writing
DRY_RUN=true ./scripts/generate-workflow.sh vercel -
Exit Codes:
0: Workflow generated successfully1: Generation failedScript: scripts/validate-cicd.sh [project-path]
Purpose: Validate complete CI/CD setup is correct
Checks:
gh CLI is authenticatedUsage:
# Validate current directory
./scripts/validate-cicd.sh
# Validate specific path
./scripts/validate-cicd.sh /path/to/project
# Detailed validation report
VERBOSE=true ./scripts/validate-cicd.sh
Exit Codes:
0: All validations passed1: One or more validations failedFile: templates/vercel-workflow.yml
Features:
Triggers:
main → Production deploymentFile: templates/digitalocean-app-workflow.yml
Features:
Triggers:
main → Production deploymentdevelop → Staging deploymentFile: templates/digitalocean-droplet-workflow.yml
Features:
Triggers:
main → Production deployment# 1. Ensure prerequisites
gh auth status # Must be authenticated
vercel whoami # Must be logged in
echo $VERCEL_TOKEN # Must be set
# 2. Run complete CI/CD setup
cd /path/to/your/project
bash ~/.claude/plugins/marketplaces/dev-lifecycle-marketplace/plugins/deployment/skills/cicd-setup/scripts/setup-cicd.sh vercel
# 3. Validate setup
bash ~/.claude/plugins/marketplaces/dev-lifecycle-marketplace/plugins/deployment/skills/cicd-setup/scripts/validate-cicd.sh
# 4. Test deployment
git add .github/workflows/deploy.yml
git commit -m "ci: Add automated deployment workflow"
git push origin main
That's it! CI/CD is now fully configured and automated.
VERCEL_ORG_ID and VERCEL_PROJECT_ID from .vercel/project.jsongh secret set to configure:
VERCEL_TOKEN (from environment)VERCEL_ORG_ID (extracted)VERCEL_PROJECT_ID (extracted).github/workflows/deploy.yml from template# Every push to main deploys automatically
git add .
git commit -m "feat: New feature"
git push origin main
# → GitHub Actions automatically builds and deploys to production
# Pull requests create preview deployments
git checkout -b feature-branch
git push origin feature-branch
# Create PR → GitHub Actions deploys preview
# Authentication
gh auth login
gh auth status
# Secret Management
gh secret set SECRET_NAME
gh secret set SECRET_NAME < secret.txt
gh secret set SECRET_NAME --body "value"
gh secret list
gh secret remove SECRET_NAME
# Repository Info
gh repo view
gh repo view --json owner,name
# Workflow Management
gh workflow list
gh workflow run deploy.yml
gh workflow view deploy.yml
gh run list
gh run watch
Prerequisites:
npm install -g vercel
vercel login
export VERCEL_TOKEN="your_token_here"
Project Linking:
cd /path/to/project
vercel link # Creates .vercel/project.json
IDs Location: .vercel/project.json
{
"orgId": "team_abc123",
"projectId": "prj_xyz789"
}
Secrets Configured:
VERCEL_TOKEN: Authentication tokenVERCEL_ORG_ID: Organization/team IDVERCEL_PROJECT_ID: Project IDWorkflow Features:
Prerequisites:
# Install doctl
brew install doctl # macOS
# OR
wget https://github.com/digitalocean/doctl/releases/download/v1.94.0/doctl-1.94.0-linux-amd64.tar.gz
tar xf doctl-1.94.0-linux-amd64.tar.gz
sudo mv doctl /usr/local/bin
# Authenticate
doctl auth init
export DIGITALOCEAN_ACCESS_TOKEN="your_token_here"
App Creation:
doctl apps create --spec app-spec.yml
doctl apps list # Get app ID
Secrets Configured:
DIGITALOCEAN_ACCESS_TOKEN: API tokenDO_APP_ID: Application IDDO_APP_NAME: Application nameWorkflow Features:
Prerequisites:
doctl auth init
export DIGITALOCEAN_ACCESS_TOKEN="your_token_here"
# Set up SSH key
ssh-keygen -t ed25519 -C "deploy@myapp"
doctl compute ssh-key import deploy-key --public-key-file ~/.ssh/id_ed25519.pub
Secrets Configured:
DIGITALOCEAN_ACCESS_TOKEN: API tokenDROPLET_ID: Droplet IDSSH_PRIVATE_KEY: SSH private key for deploymentWorkflow Features:
.gitignore for sensitive files@latest# Check authentication
gh auth status
# Login
gh auth login
# Use token
gh auth login --with-token < token.txt
# List secrets
gh secret list
# Verify in specific repo
gh secret list --repo owner/repo
# Set manually
gh secret set SECRET_NAME --body "value"
# Check workflow file syntax
gh workflow view deploy.yml
# Check recent runs
gh run list --workflow=deploy.yml
# View run details
gh run view RUN_ID
# Vercel: Ensure project is linked
vercel link
# DigitalOcean: Ensure app exists
doctl apps list
# Check extraction script
bash scripts/extract-platform-ids.sh vercel . --verbose
Free Tier:
Tips:
actions/cache)Vercel:
DigitalOcean:
Railway:
This skill integrates with:
/deployment:prepare - Validates prerequisites before CI/CD setup/deployment:deploy - Uses CI/CD for automated deployments/deployment:validate - Validates CI/CD pipeline configuration/foundation:hooks-setup - Integrates with git hooks for local validationSee examples/ directory for:
vercel-setup.md - Complete Vercel CI/CD setup walkthroughdigitalocean-setup.md - DigitalOcean App Platform setupmulti-environment.md - Staging + production environmentsmonorepo-setup.md - Monorepo deployment strategies