Intermediate LevelGit & GitHub
How do GitHub Deployment Environments manage approval gates for staging vs production?
❓ Interview Prompt: Explain GitHub Deployment Environments, required reviewers, deployment protection rules, and environment-scoped secrets.
GitHub Environments configure deployment protection rules (required reviewers, wait timers) and environment-specific secrets for staging and production targets.
Code Implementation Example
yaml
jobs:
deploy:
runs-on: ubuntu-latest
environment: production
steps:
- run: ./deploy.sh💡Triggering GitHub Environment deployment approval gates in Actions YAML.
🎯 Interview Key Takeaway
Use GitHub Deployment Environments to enforce manual reviewer approvals and isolate production secrets.
#Environments#Deployments#GitHub#Intermediate
Back to all Git & GitHub Questions→