GitHub Workflow File: main.yml
In .github/workflows/main.yml, you'll find our CI/CD script for deploying to staging and production with CDK.
How It Works:
- Trigger: Runs on pushes to the
stagingbranch and when a pull request is merged fromstagingintomain. - Testing: Uses Docker Compose to run tests.
- AWS Setup: Configures AWS credentials via OIDC and sets environment variables from GitHub Secrets.
- Deployment: Deploys to the staging or production AWS account.
- Database Migrations: Establishes an AWS SSM session for database access and applies Prisma migrations.
- Cleanup: Terminates the SSM session after migrations.
Simple and automated—the workflow takes care of the rest!