Skip to main content

CI/CD

Continuous Integration + Continuous Delivery. The goal: every commit is releasable.


Pipeline Flow


My Tool Choices

StageTool I use
CI runnerGitHub Actions (most projects), Jenkins (enterprise)
Container buildDocker + GitHub Actions cache
DeploymentVercel (Next.js), Render, or K8s + Helm
SecretsGitHub Secrets / Vault
NotificationsSlack via Actions webhook

GitHub Actions Pattern I Reuse

name: CI

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npm run lint
- run: npm test
- run: npm run build

Key decisions I always make:

  • Cache dependencies (cache: 'npm') — saves 30–60s per run
  • Run lint before tests — fails fast on style issues
  • npm ci not npm install — reproducible installs from lockfile

Deployment Strategies

StrategyHowZero downtimeRisk
Rolling updateReplace instances one at a timeMedium
Blue/GreenSwitch traffic from old to new envLow (easy rollback)
CanaryRoute % of traffic to new versionLow (gradual rollout)
RecreateStop all old, start all newHigh (downtime)

My default: Rolling update for simple services, Blue/Green when I need instant rollback.


Reference