Overview
The pipeline is built with GitHub Actions and deploys using AWS SAM, which packages artifacts to S3 and applies infrastructure changes through CloudFormation.Pipeline stages
| Stage | Trigger | Environment |
|---|---|---|
test | All PRs and every push to main | — |
deploy-qa | PR opened | QA (duitama-taxi-pricing-qa) |
deploy-staging | Merge to main | Staging (duitama-taxi-pricing-staging) |
deploy-production | Manual approval | Production (duitama-taxi-pricing-production) |
How it works
test — run on every PR and push to main
The test job runs
npm test (Jest) on every pull request and on every push to the main branch. All subsequent deploy jobs depend on this job passing.deploy-qa — triggered when a PR is opened
When a pull request is opened, the pipeline deploys the code to the QA stack (
duitama-taxi-pricing-qa) after tests pass. This gives every PR a live preview environment in API Gateway.deploy-staging — triggered on merge to main
When a PR is merged into
main, the pipeline deploys to the staging stack (duitama-taxi-pricing-staging) after tests pass.deploy-production — requires manual approval
After staging deploys successfully, the pipeline waits for a manual approval in the GitHub Environments UI before deploying to production. Once approved:Production is the only environment with API Gateway caching enabled (600-second TTL on GET endpoints).
Required secrets
Add the following secrets to your GitHub repository under Settings → Secrets and variables → Actions. The pipeline reads these to authenticate with AWS during SAM deploys.
| Secret | Description |
|---|---|
AWS_ACCESS_KEY_ID | AWS IAM access key ID |
AWS_SECRET_ACCESS_KEY | AWS IAM secret access key |