Intermediate2 h
Estimated — self-paced course, go at your own speed.
GitHub Environments: how they work, governance, and strategy
"Environment" on GitHub covers two things people often conflate: a native GitHub Actions feature (Settings > Environments), and the broader concept of a deployment environment (dev/staging/prod). This course starts with the concrete feature — creating it, protecting it, referencing it in a workflow — then zooms out to strategy: when to use it, when an alternative (like a hosting platform's deploy previews) is enough, and how to decide with a set of criteria rather than by instinct. Every technical module includes a real hands-on step on your own repo.
Modules
- 1Prerequisites and overviewClarify exactly what "environment" means on GitHub, and check you have what you need before starting.
- 2The GitHub Environments featureCreate an Environment, attach a scoped variable to it (and see how to add a secret too), reference it in a workflow, and watch the Deployments page.
- 3Protection rules and governanceConfigure a required reviewer, trigger a deployment, watch it block waiting for approval, then approve it.
- 4Advantages, drawbacks, and costsObjectively weigh what Environments bring, what they cost in complexity, and the GitHub plan constraint you need to know before relying on them.
- 5Environment strategy in the broader senseDev/staging/prod, ephemeral environments per pull request, branch-to-environment mapping, and secret management across multiple environments — beyond the single GitHub feature.
- 6Decision matrix for choosing an approachA set of criteria for deciding, without guesswork, between GitHub's Environment feature, a third-party platform, or no formal environments at all.