Deployment #1063
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: Deployment | |
on: | |
workflow_dispatch: | |
inputs: | |
ref: | |
description: "Version to deploy" | |
required: true | |
permissions: | |
id-token: write | |
packages: write | |
env: | |
STACK_NAME: ${{ vars.STACK_NAME }} | |
AWS_REGION: ${{ vars.AWS_REGION }} | |
FORCE_COLOR: 3 | |
JSII_SILENCE_WARNING_UNTESTED_NODE_VERSION: 1 | |
jobs: | |
print-inputs: | |
name: Print inputs | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Print inputs | |
run: | | |
echo ref=${{ github.event.inputs.ref }} | |
deploy: | |
runs-on: ubuntu-24.04 | |
environment: production | |
env: | |
FORCE_COLOR: 3 | |
JSII_SILENCE_WARNING_UNTESTED_NODE_VERSION: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.inputs.ref }} | |
- name: Determine released version | |
id: version | |
run: | | |
git fetch --tags | |
VERSION=`git describe --abbrev=0 --tags --always | tr -d '\n'` | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "22.x" | |
cache: "npm" | |
- name: Install dependencies | |
run: npm ci --no-audit | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{ secrets.AWS_ROLE }} | |
aws-region: ${{ vars.AWS_REGION }} | |
- run: npx cdk diff | |
- name: Deploy solution stack | |
run: npx cdk deploy --all --require-approval never |