Git & GitHub Interview Question #93

What is CD in a GitHub workflow?

GitHub Collaboration, Repository Rules, Issues, Releases & Actions CI/CD Mid-Level Intermediate

Quick Interview Answer

CD can refer to Continuous Delivery or Continuous Deployment. Continuous Delivery keeps software in a deployable state and may require a manual approval for production, while Continuous Deployment automatically releases qualifying changes to production.

Detailed Explanation

CD can refer to Continuous Delivery or Continuous Deployment. Continuous Delivery keeps software in a deployable state and may require a manual approval for production, while Continuous Deployment automatically releases qualifying changes to production.

GitHub Actions can automate packaging and deployment after CI succeeds. Production workflows should include appropriate permissions, environment protection, secrets management, rollback planning, and deployment observability.

Code Example

jobs:
  deploy:
    needs: build
    runs-on: ubuntu-latest
    environment: production
    steps:
      - run: echo "Deploy application"
      # Actual deployment depends on the platform.