Skip to content

CD Pipelines

Jesse edited this page Dec 7, 2025 · 1 revision

CD (Continuous Deployment) refers to automatically deploying applications after they pass CI checks.
In the practicum, we do not currently deploy projects automatically, but future repos may adopt CD using cloud services, containers, and automated GitHub Actions workflows.


What CD Pipelines Do

General Overview

A CD pipeline publishes code to a live environment after it:

  • Passes all CI checks
  • Builds successfully
  • Produces a deployable artifact (ex: build output, Docker image)

CD typically handles:

Step Example
Build Compile production version of app
Package Create Docker image or file bundle
Upload Push artifact to registry or server
Deploy Run service or upload to host
Post-Deploy Tests Sanity tests, smoke tests

Common CD Targets

  • Cloud providers (AWS, Azure, GCP, Render, Railway)
  • Static hosting (Vercel, Netlify)
  • Containers (Docker Hub, GitHub Registry + Kubernetes)

Why We Do Not Use CD Yet

Current Practicum Context

CD requires:

  • A stable hosting provider managed over multiple quarters
  • Security & access controls for deploy keys
  • Long-term maintenance of environments and costs
  • Operational monitoring & rollback strategy

At this time, these requirements make full CD unsuitable for practicum turnover and student ownership.

⚠️ We deliberately avoid automatic production deployments to prevent accidental overwrites and semester-to-semester instability.


How We Might Introduce CD in the Future

Potential Future CD Standards

The goal would be predictable, safe deployments with minimal cost.

Potential CD Workflow

on:
  push:
    branches: [ main ]

jobs:
  deploy:
    if: ${{ success() }}
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm ci && npm run build
      - run: npx vercel deploy --prod --token=${{ secrets.VERCEL_TOKEN }}

Safe CD Rules

  • Deploy only from main
  • Use environment secrets (never hardcoded keys)
  • Require CI success before deploy
  • Support manual rollback or environment freeze

Possible Deployment Targets Per Tech Stack

Tech Potential Host
Next.js Vercel, Netlify
NestJS Render, Railway, AWS
Monorepos GitHub Packages + Docker Registry

Future Student Project Idea

Create a shared practicum deployment platform that automatically deploys selected projects each quarter with controlled permissions.


Minimum Expectations (Even Without CD)

Standards All Projects Should Follow

Even if no deployment occurs, student repos must prepare for CD by:

  • Producing builds with npm run build (or equivalent)
  • Keeping build output out of version control (e.g., dist/, .next/)
  • Managing environment variables through .env.example
  • Maintaining a README.md with deployment instructions (even if manual)

These habits allow future cohorts to introduce CD without rewriting projects.

Clone this wiki locally