Skip to content

[#475] Vercel deployment + CI/CD setup #476

@realproject7

Description

@realproject7

Parent: #475

Summary

Set up GitHub Actions deployment pipeline (same as Dropcast) and Vercel cron jobs. Do NOT use Vercel's auto-deploy — it requires adding team members for PRs from different GitHub accounts.

Steps

1. Create deploy workflow

Reference: ~/Projects/dropcast/.github/workflows/deploy-production.yml

Create .github/workflows/deploy-production.yml:

  • Trigger on push to main + manual dispatch
  • Concurrency group: production-deploy (no cancel-in-progress)
  • Steps: checkout → setup Node 20 → install vercel@39 → pull env → build → deploy (prebuilt, prod)
  • Uses secrets: VERCEL_TOKEN, VERCEL_ORG_ID, VERCEL_PROJECT_ID
  • Deploy summary in GitHub Actions output
  • Change github.repository check to realproject7/plotlink

2. Disable Vercel auto-deploy

OPERATOR: In Vercel project settings:

  • Go to Settings → Git → Ignored Build Step
  • Set command to exit 0
  • This prevents Vercel from building on push (Actions handles it)
  • Cron jobs, domains, and other Vercel features still work

3. Create vercel.json

Add cron job for backfill:

{
  "crons": [
    {
      "path": "/api/cron/backfill",
      "schedule": "*/5 * * * *"
    }
  ]
}

4. Operator: GitHub secrets

Add these to realproject7/plotlink repo settings → Secrets and variables → Actions:

  • VERCEL_TOKEN — from Vercel Settings → Tokens (personal access token)
  • VERCEL_ORG_ID — from .vercel/project.json after vercel link, or Vercel dashboard
  • VERCEL_PROJECT_ID — same source

5. Operator: Create GitHub environment

Create a production environment in repo Settings → Environments (the workflow references environment: production)

6. Verify cron authentication

Ensure the backfill cron endpoint checks CRON_SECRET:

  • Vercel sends Authorization: Bearer <CRON_SECRET> automatically for cron requests
  • The endpoint should reject requests without valid auth

Acceptance Criteria

  • Deploy workflow runs on push to main
  • Vercel auto-deploy disabled (exit 0 on Ignored Build Step)
  • vercel.json with cron config committed
  • GitHub secrets configured (operator)
  • Production environment created (operator)
  • Test: push to main triggers Actions deploy, NOT Vercel auto-deploy
  • Cron job fires every 5 minutes

Branch

task/476-vercel-deploy in plotlink repo

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/T3Assigned to T3 builder agent

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions