Skip to content

02 - CDK Deploy Network #2

02 - CDK Deploy Network

02 - CDK Deploy Network #2

Workflow file for this run

# This workflow creates all environment-specific resources that are shared across applications.
# This needs to run before creating an application-specific environment.
name: 02 - CDK Deploy Network
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
on:
workflow_dispatch:
inputs:
environmentName:
description: 'The name of the environment to create.'
required: true
default: 'staging'
jobs:
deploy-network-stack:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-20.04
name: Deploy the network stack
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: 'gradle'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-overwrite-existing: true
- name: NPM install
working-directory: cdk
run: npm install
- name: Deploy Network stack
working-directory: cdk
run: npm run network:deploy -- -c environmentName=${{ github.event.inputs.environmentName }}
- name: Deploy Certificate stack
working-directory: cdk
run: npm run certificate:deploy -- -c environmentName=${{ github.event.inputs.environmentName }}
- name: Deploy DNS stack
working-directory: cdk
run: npm run domain:deploy -- -c environmentName=${{ github.event.inputs.environmentName }}