Fundamentals — Cheat Sheet
CI/CD & GitHub Actions · 1 topics. Download the PDF or the Instagram carousel and share it.
Cheat Sheet · AiCanCode.org
Fundamentals
CI/CD & GitHub Actions1 topicsQuick revision reference
1
What is CI/CD and Why It Matters
CI/CD automates the path from code commit to production deployment. Continuous Integration catches bugs early; Continuous Delivery/Deployment eliminates manual, error-prone release processes.
- ✓CI: every commit triggers build + tests to keep main always working.
- ✓CD (Delivery): artifact is always deployable; human decides when to release.
- ✓Continuous Deployment: every green build automatically ships to production.
- ✓Fail fast: run cheapest checks first (lint → unit tests → integration tests → E2E).
- ✓GitHub Actions triggers on events: push, pull_request, schedule, workflow_dispatch.
- ✓actions/checkout, actions/setup-node are official actions from GitHub — always use versioned tags (@v4).
CI/CD pipeline stages overview
Developer pushes code
│
â–¼
┌──────────────────â”
│ 1. SOURCE │ GitHub/GitLab detects push → triggers pipeline
â””────────┬─────────┘
│
â–¼
┌──────────────────â”
│ 2. BUILD │ Compile code, install dependencies, build Docker image
â””────────┬─────────┘ ↠fails here if: compile errors, missing deps
│
â–¼
┌──────────────────â”
│ 3. TEST │ Unit tests, integration tests, linting, security scan
â””────────┬─────────┘ ↠fails here if: tests fail, coverage drops, CVEs found
│
â–¼
┌──────────────────â”
│ 4. STAGING │ Deploy to staging environment, run E2E tests
â””────────┬─────────┘ ↠fails here if: deployment fails, E2E tests fail
│
â–¼
┌──────────────────â”
│ 5. PRODUCTION │ Manual approval (CD) or automatic (Continuous Deployment)
â””──────────────────┘
Key principle: FAIL FAST — catch errors in the cheapest stage (unit tests)
before they reach expensive stages (E2E tests, staging deploy)Learn this free with Aria, your AI tutor → AiCanCode.org/learn/cicd