CI/CD Pipeline¶
The CI/CD pipeline is defined in .github/workflows/deploy.yml.
Triggers¶
| Event | Jobs Run |
|---|---|
Pull Request to main | test, terraform-plan |
Push to main | test, ensure-ecr, build-and-push, deploy |
| Manual (workflow_dispatch) | All jobs |
Pipeline Jobs¶

test¶
Runs on every PR and push to main.
terraform-plan (PR only)¶
Shows infrastructure changes without applying them.
- Runs
terraform plan - Posts plan output as PR comment
- Helps review infrastructure changes
ensure-ecr (main only)¶
Ensures ECR repository exists before pushing images.
build-and-push (main only)¶
Builds and pushes Docker image to ECR.
- Platform:
linux/amd64 - Tag:
sha-{commit}-run-{run_number} - Uses Docker layer caching
deploy (main only)¶
Deploys to App Runner.
steps:
- terraform init
- terraform apply
- Wait for deployment (up to 5 minutes)
- Health check (up to 15 retries)
Required Secrets¶
| Secret | Purpose |
|---|---|
AWS_CI_ROLE_ARN | GitHub OIDC role for AWS |
DB_PASSWORD | RDS database password |
CLOUDFLARE_API_TOKEN | Cloudflare API access |
CLOUDFLARE_ZONE_ID | luminarium.ai zone ID |
CLOUDFLARE_ACCOUNT_ID | Cloudflare account |
Deployment Process¶
- Quality gates pass - lint, type-check, test, build
- ECR repository ready - Created if needed
- Docker image built - Multi-stage build, pushed to ECR
- Terraform apply - Infrastructure updated
- Wait for deployment - App Runner updates service
- Health check - Verifies
/api/healthreturns 200
Viewing Pipeline Status¶
GitHub Actions UI¶
- Go to repository → Actions tab
- Click on workflow run
- View job logs
PR Comments¶
Terraform plan output is posted as a PR comment:
## Terraform Plan ✅ Plan Succeeded
<details>
<summary>Click to expand</summary>
... plan output ...
</details>
Troubleshooting¶
Build Failures¶
Lint errors:
Type errors:
Build errors:
Deployment Failures¶
Terraform errors: - Check Terraform plan in PR comments - Verify secrets are set correctly - Check AWS permissions
Health check failures: - Check App Runner logs in AWS Console - Verify DATABASE_URL is correct - Check application logs
Manual Deployment¶
In emergencies, you can trigger a manual deployment:
- Go to Actions → "Luminarium Proof CI/CD"
- Click "Run workflow"
- Select
mainbranch - Click "Run workflow"
Infrastructure Changes
Only infrastructure owners should modify the CI/CD pipeline.