Environments separate deployment targets
GitHub environments can represent targets such as development, staging and production. They can hold environment-specific secrets and protection rules.
Production should have stronger controls
A production environment can require approval before a deployment proceeds. This creates a clear gate between automated build and actual release.
Do not duplicate application configuration unnecessarily
Keep environment-specific values in secure configuration rather than committing separate secret-filled files for each environment.