A hands-on, progressive learning lab for mastering GitHub Actions CI/CD. Build a real pipeline from scratch -- starting with "Hello World" and ending with a production release workflow with deployment approvals and AI-powered code review.
This is a self-paced curriculum for learning GitHub Actions by doing. Instead of reading documentation in the abstract, you work through 11 chapters that progressively build a complete CI/CD pipeline using a real Node.js application, a real GitHub repository, and real running workflows.
Each chapter introduces new concepts, explains why they exist (not just how to use them), and gives you step-by-step instructions to implement them yourself. You watch the workflows run in the GitHub Actions UI and interact with the platform directly.
By the end of this lab, you'll have a production-grade pipeline that looks like this:
%%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#dce6f0', 'primaryTextColor': '#24292f', 'primaryBorderColor': '#82a5c9', 'lineColor': '#57606a', 'secondaryColor': '#f0f4e8', 'tertiaryColor': '#fef3e0'}}}%%
graph LR
tag[Tag Release] --> test[Test Matrix<br/>Node 18/20/22]
tag --> lint[Lint]
test --> build[Build]
lint --> build
build --> staging[Deploy Staging]
staging --> approve{Manual<br/>Approval}
approve --> production[Deploy Production]
production --> release[Create<br/>GitHub Release]
- Node.js 20+ -- Download
- git -- Download
- A GitHub account -- Sign up
- GitHub CLI (
gh) -- Install (optional but recommended)
# Clone the repo
git clone https://github.com/Rmohid/github-actions-demo.git
cd github-actions-demo
# Install dependencies
npm install
# Run tests locally (to verify everything works)
npm test
# Start with Chapter 1Open docs/chapters/01-your-first-workflow.md and follow along.
| # | Chapter | What You'll Learn |
|---|---|---|
| 1 | Your First Workflow | Workflow files, YAML syntax, triggers, jobs, steps, the Actions UI |
| 2 | Running Tests in CI | Marketplace actions, checkout, setup-node, running tests, status badges |
| 3 | Linting and Code Quality | Multiple jobs, needs dependencies, parallel execution, job conditionals |
| 4 | Pull Request Workflows | PR triggers, branch protection, required status checks, GITHUB_TOKEN |
| 5 | Build Artifacts and Caching | Dependency caching, upload/download artifacts, retention policies |
| 6 | Environment Variables and Secrets | env scoping, ${{ }} expressions, contexts, secrets management |
| 7 | Environments and Deployment | GitHub Environments, approval gates, deploying to GitHub Pages |
| 8 | Matrix Builds and Reusable Workflows | Matrix strategy, multi-version testing, workflow_call, DRY pipelines |
| 9 | Custom Actions and Advanced Triggers | Composite actions, workflow_dispatch, schedule, cron triggers |
| 10 | The Complete Production Pipeline | Release tagging, full pipeline, rollback strategy, concurrency controls |
| 11 | AI in Your Pipeline | AI-powered code review, LLM integration, prompt engineering for CI |
The learning vehicle is a simple calculator web application built with Node.js and Express. It has:
- API routes:
/api/add,/api/subtract,/api/multiply,/api/divide - Web UI: A single-page calculator interface
- Tests: Unit tests (Vitest) for the calculator logic and integration tests for the API
- Linting: ESLint for code quality
- Build: Generates static HTML for GitHub Pages deployment
The app is deliberately simple -- it exists to give the CI/CD pipeline something real to test, lint, build, and deploy. The focus is on the pipeline, not the app.
github-actions-demo/
├── .github/
│ ├── workflows/ # GitHub Actions workflow files (you build these)
│ └── actions/ # Custom composite actions (Chapter 9)
├── src/
│ ├── calculator.js # Calculator logic (pure functions)
│ ├── index.js # Express server with API routes
│ └── public/
│ └── index.html # Web UI
├── tests/
│ ├── calculator.test.js # Unit tests
│ └── api.test.js # API integration tests
├── scripts/
│ └── build.js # Build script for GitHub Pages
├── docs/
│ └── chapters/ # Learning guides (11 chapters)
├── package.json
└── eslint.config.js
MIT