Skip to main content

Deploy Infrastructure

The deploy-infra.yml workflow deploys both CDK stacks to AWS.

Trigger

EventCondition
Push to mainOnly when files under infra/ change
Manualworkflow_dispatch — no conditions

Required GitHub variables

VariableValue
AWS_DEPLOY_ROLE_ASSUMEARN of github-oidc-deploy-role
AWS_REGIONeu-west-1
AWS_ACCOUNTAWS account ID (used as CDK context)

What it does

  1. Checks out the repository.
  2. Assumes github-oidc-deploy-role via OIDC — no long-lived credentials.
  3. Installs CDK dependencies.
  4. Deploys both stacks. CloudFormation applies only the diff since the last deploy.

Notes

  • The deploy role uses least-privilege permissions (CloudFormation, S3, IAM PassRole, SSM, CDK bootstrap roles only).
  • Stacks are deployed with --require-approval never to avoid interactive prompts in CI.
  • The S3 bucket has removalPolicy: RETAIN — it is never deleted, even if the stack is destroyed.