Skip to main content
InterviewHubPRO
Section Overview
Q49

Question 49 of 50

Part 3: Enterprise Scale, Compliance & Production Hardening (Senior / Staff)

98%
CI/CD & GitHub Actions (50 Qs)•Part 3: Enterprise Scale, Compliance & Production Hardening (Senior / Staff)

Deployment Protection Rules and Environment Approvals for multi-stage enterprise deployments.

senior LevelCode ExampleKubernetes

In Simple Words: GitHub Environments provide production safeguards:

  1. Required Reviewers: Deployments pause and trigger email/Slack notifications until specified senior engineers or team leads approve.
  2. Wait Timers: Delays deployment execution (e.g., wait 30 minutes in canary stage before proceeding to production).
  3. Deployment Branches: Enforce that the production environment can strictly be triggered only from the main branch.
yaml
jobs:
  deploy-prod:
    environment:
      name: production
      url: https://prod.example.com
    runs-on: ubuntu-latest
    steps:
      - run: ./deploy.sh