CI vs CD vs CD — The Three Terms

TermWhat it automatesManual step?
Continuous Integration (CI)Build + test on every commitNone — fully automated
Continuous Delivery (CD)CI + prepare release artifactYes — human approves production deploy
Continuous Deployment (CD)CI + auto-deploy to productionNone — fully automated end-to-end

Most teams start with CI + Continuous Delivery (human gate before production). Full Continuous Deployment requires very high test coverage and confidence in monitoring/rollback.

A Typical CI/CD Pipeline

Code Push Build Test Security Scan Deploy Staging E2E Tests Deploy Production

If any stage fails, the pipeline stops and alerts the team. Code never reaches the next stage unless the current stage passes.

GitHub Actions — CI/CD in Practice

.github/workflows/ci.yml — Node.js CI pipeline name: CI on: push: branches: [main] pull_request: branches: [main] jobs: test: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: '20' cache: 'npm' - name: Install dependencies run: npm ci - name: Run linter run: npm run lint - name: Run tests run: npm test - name: Build run: npm run build deploy: needs: test runs-on: ubuntu-latest if: github.ref == 'refs/heads/main' steps: - name: Deploy to production run: echo "Deploy step here"

Popular CI/CD Tools Compared

ToolHosted/Self-hostedBest ForCost
GitHub ActionsHosted (GitHub)GitHub repos, simple setupFree tier available
GitLab CI/CDBothGitLab repos, full DevOps platformFree tier available
JenkinsSelf-hostedEnterprises, full customisationFree (infra cost only)
CircleCIHostedFast builds, Docker-nativeFree tier available
AWS CodePipelineHosted (AWS)AWS-native deploymentsPay per use
Bitbucket PipelinesHosted (Atlassian)Bitbucket repos, Jira integrationFree tier available

CI/CD Best Practices

  • Keep pipelines fast: Target under 10 minutes for CI. Run tests in parallel. Cache dependencies.
  • Fail fast: Put the fastest checks (linting, unit tests) first so developers get feedback in under 2 minutes.
  • Build once: Create the deployment artifact once; deploy the same artifact to staging and production. Never rebuild for production.
  • Test in production-like environment: Staging should mirror production configuration as closely as possible.
  • Feature flags over long-lived branches: Merge frequently; use flags to hide incomplete features.
  • Monitor after deploy: Watch error rates and key metrics for 15 minutes post-deploy. Have an automated rollback trigger.

💡 Start Small

You do not need a perfect pipeline on day one. Start with: (1) Run tests on every PR. (2) Block merge if tests fail. That alone eliminates most regression bugs. Add staging deploys, E2E tests, and security scans incrementally.

How We Research and Update This Guide

We test the underlying formula or workflow, compare outputs with reliable references, and revise examples whenever the page content changes.

  • The workflow or formula is tested directly in the tool and compared against independent reference examples.
  • Examples are kept practical so readers can verify the result without hidden assumptions.
  • Pages are revised whenever the interface, calculation flow, or surrounding guidance materially changes.

Frequently Asked Questions — CI/CD