Skip to content

Deploy Dev

Deploy Dev #23

Workflow file for this run

name: Deploy Dev
on:
workflow_dispatch:
workflow_run:
workflows: ["CI"]
types: [completed]
branches:
- main
permissions:
id-token: write
contents: read
jobs:
deploy:
if: ${{ github.event_name != 'workflow_run' || (github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push' && github.event.workflow_run.head_branch == 'main') }}
runs-on: ubuntu-latest
environment: dev
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.sha }}
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npm run lint
- run: npm run typecheck
- run: npm test
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_DEPLOY_ROLE_ARN }}
aws-region: ${{ vars.AWS_REGION }}
- run: npm run build
- run: npx cdk deploy TrustedLearningContextServiceStack-dev --require-approval never --context stage=dev