Skip to content

Update infra smoke tests for new instance configs #23

Update infra smoke tests for new instance configs

Update infra smoke tests for new instance configs #23

Workflow file for this run

name: Deploy
on:
push:
branches: [main]
workflow_dispatch:
inputs:
stage:
description: SST stage to deploy
required: true
default: dev
type: choice
options:
- dev
- staging
- production
permissions:
id-token: write
contents: read
concurrency:
group: deploy-${{ inputs.stage || 'production' }}
cancel-in-progress: false
env:
SST_STAGE: ${{ inputs.stage || 'production' }}
jobs:
migrate:
name: Run Database Migrations
runs-on: ubuntu-latest
timeout-minutes: 5
environment: ${{ inputs.stage || 'production' }}
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun install --frozen-lockfile
- name: Run database migrations
run: bun run db:migrate:run
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
deploy:
name: Deploy SST (${{ inputs.stage || 'production' }})
needs: [migrate]
runs-on: ubuntu-latest
timeout-minutes: 30
environment: ${{ inputs.stage || 'production' }}
steps:
- uses: actions/checkout@v4
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: us-east-1
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun install --frozen-lockfile
- name: Deploy with SST
run: bunx sst deploy --stage $SST_STAGE