SazM

Automated Deployment Pipeline

Designed and implemented a CI/CD pipeline reducing deployment time from 45 minutes to 3 minutes.

GitHub ActionsDockerCloudflare PagesPlaywright

Problem

The team’s deployment process was entirely manual. A developer would build locally, upload via FTP, and manually run database migrations. Deployments took 45 minutes of unbroken concentration, happened at most twice per week, and frequently broke in production due to environment differences.

Approach

We designed a fully automated deployment pipeline with three stages:

  1. CI (GitHub Actions) — On every push to any branch: lint, type-check, unit test, build. On push to main: additionally run integration tests and end-to-end tests with Playwright.
  2. CD (GitHub Actions + Cloudflare Pages) — On successful main build: deploy to Cloudflare Pages preview, run smoke tests against preview URL, promote to production.
  3. Rollback — One-click rollback via Cloudflare Pages dashboard. Automatic rollback on smoke test failure.

Architecture decisions

  • Preview deployments: Every PR gets a unique preview URL. No more “works on my machine.”
  • Smoke tests as gate: A failed smoke test blocks production promotion. The pipeline fails fast.
  • No FTP: Everything goes through Git + CI/CD. No manual file transfers, no SSH access needed for deployment.

Outcome

MetricBeforeAfter
Deployment time45 minutes3 minutes
Deployment frequency2x per week10x per day
Failed deployments~20%< 1%
Rollback time30+ minutes< 30 seconds

Related Projects