

Lesson 01 · 12 min
CI, CD and workflow anatomy
How delivery differs from deployment and what a GitHub Actions YAML file is made of.
12 minLesson 1 of 5Practice includedAsk AI on any point
What this course covers
- Lesson 1. CI, continuous delivery and continuous deployment, workflow anatomy.
- Lesson 2. A pipeline for Node and TypeScript: caching, lint, types, tests, build, a version matrix.
- Lesson 3. Secrets, variables, environments with reviewers, GITHUB_TOKEN permissions, OIDC instead of long lived keys.
- Lesson 4. Artifacts, a Docker image in a registry, deploy jobs and concurrency.
- Lesson 5. Safe releases: branch protection, deploy strategies, rollback, reusable workflows, pinning by SHA.
- Planned: self-hosted runners, monorepo pipelines, security of third-party actions in practice.
In the DevOps course we already ran a minimal CI: checkout, install, lint, tests. Here we go deeper: how a workflow is built, how to make it fast and safe, and how to get code to production so that a rollback takes a minute.
Three terms people mix up
- Continuous integration (CI): every change is merged into a shared branch often, and each one is checked automatically: build, lint, tests. The goal: broken code never reaches main.
- Continuous delivery (CD): every green commit on main is ready to release. The artifact is built, verified and can go to production with one human decision, such as a button or an approval.
- Continuous deployment: the same pipeline, but without a human. A green main goes to production on its own. This needs very good test coverage, monitoring and automatic rollback.
What a workflow is made of
A workflow is a YAML file in .github/workflows/. It has a trigger (on), one or more jobs, and each job has steps. By default jobs run in parallel on separate virtual machines (runners). Steps inside a job run one after another on the same machine and share the file system.
on: the events that start the workflow. The most common:push,pull_request,workflow_dispatch(manual),schedule(cron),release,workflow_call(called from another workflow).runs-on: where the job runs.ubuntu-latest,windows-latest,macos-latestor labels of your own runners.needs: a dependency between jobs. Without it jobs start at the same time.if: a condition on a job or a step, for exampleif: github.ref == 'refs/heads/main'.
uses versus run
A step comes in two kinds. run executes a shell command on the runner. uses pulls in a ready-made action: code from another repository (actions/checkout@v4), from this repository (./.github/actions/setup) or a Docker image. Action parameters go in with, environment variables in env.
- GitHub Actions: a short reference
- GitLab CI: the same approach in another tool
- GitHub Actions or GitLab CI
Check
Lock it in before you move on
1. How does continuous delivery differ from continuous deployment?
2. How do two jobs without
needsrun by default?3. What does a step with the
useskey do?4. A step built
dist/. Where is this folder available without extra work?