use latest version of node by default #127
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
workflow_dispatch: | |
inputs: | |
environment: | |
description: "Environment to deploy to" | |
type: environment | |
required: true | |
push: | |
branches: | |
# - main | |
- '*dev' | |
- '*qa' | |
env: | |
TZ: America/New_York | |
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }} | |
AWS_REGION: ${{ secrets.AWS_REGION }} | |
TIER: ${{ secrets.TIER }} | |
jobs: | |
Deploy: | |
permissions: | |
contents: "read" | |
id-token: "write" | |
runs-on: ubuntu-latest | |
environment: ${{ (endsWith(github.ref, 'dev') && 'dev') || (endsWith(github.ref, 'qa') && 'qa') || inputs.environment || 'dev' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 # Use latest version of node | |
- uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-region: ${{ secrets.AWS_REGION }} | |
role-to-assume: ${{ secrets.AWS_ROLE_ARN }} # ARN must not contain the words "github" or "actions" (https://github.com/aws-actions/configure-aws-credentials/issues/1093) | |
- run: npm install -g aws-cdk | |
- run: echo "${{ secrets.ENV_FILE }}" > infrastructure/.env | |
- run: bash deploy.sh |