E-007: CI/CD & First Deployment

Status: In Progress Owner: @bilal @deen Priority: P1 — Ship to Production Last Updated: 2026-02-22

Objective

Get the application deployed to production with a reliable CI/CD pipeline.

What’s Done

  • CI-001: Basic CI workflow (lint + test on PR)
  • DEPLOY-001: Supabase cloud project (cslpfplavhdkfprrmwno) — migrations run on deploy
  • DEPLOY-002: Cloudflare Workers deployment (via @opennextjs/cloudflare, wrangler deploy)
  • DEPLOY-004: Production secrets (GitHub Actions secrets + wrangler secrets configured)
  • DEPLOY-005: Domain + DNS + CORS (app.ehq.tech → Cloudflare Workers, Terraform-managed)
  • Cloudflare Access ZTNA (email OTP auth gate for dashboard)
  • Hyperdrive connection pooling (Supabase Postgres)
  • Terraform IaC for dashboard + brain infrastructure
  • Brain docs site deployed to Cloudflare Pages (brain.ehq.tech)

What’s Next

TaskIDDescriptionStatus
Build step in CICI-002Add type-check + build to GitHub ActionsNext
Health check endpointDEPLOY-003GET /api/health — checks DB + LLM availabilityNext
Security scanningCI-003Trufflehog (secrets), Semgrep (SAST), pnpm audit (deps)Planned
Error monitoringDEPLOY-006Sentry SDK, source mapsPlanned

Pipeline Design

PR → Lint + Type-Check → Tests → Build → Security Scan → AI Code Review
  → (on merge to main) → DB Migrations → Deploy to Cloudflare Workers → Smoke Tests

Infrastructure

ComponentService
HostingCloudflare Workers (via @opennextjs/cloudflare)
Connection PoolCloudflare Hyperdrive
Auth Gate (ZTNA)Cloudflare Access (email OTP)
DatabaseSupabase Cloud
Domainehq.tech (app.ehq.tech, brain.ehq.tech)
IaCTerraform Cloud + Cloudflare provider
CI/CDGitHub Actions
ErrorsSentry (planned)
UptimeUptimeRobot (planned)

Dependencies

  • Domain registration (ehq.tech) Done
  • Supabase cloud project Done
  • LLM API keys for production (configured)