Skip to content

Commit

Permalink
feat: deploy manually from GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
wolverian committed Oct 1, 2024
1 parent 3f0ef9b commit 0fd54dd
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/_deploy-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,27 @@ on:
account_id:
type: string
required: true
stacks:
type: string
default: "**"
workflow_dispatch:
inputs:
env:
type: choice
options:
- Dev
- Test
- Prod
description: Target environment
required: true
account_id:
type: string
description: Target AWS account
required: true
stacks:
type: string
description: Stacks to deploy
default: "**"

concurrency: deploy-${{ github.ref_name }}-${{ inputs.env }}

Expand Down Expand Up @@ -37,9 +58,9 @@ jobs:
working-directory: infra
- name: Deploy
if: github.ref_name == 'main'
run: npx cdk deploy --require-approval=never '${{ inputs.env }}/**'
run: npx cdk deploy --require-approval=never --exclusively '${{ inputs.env }}/${{ inputs.stacks }}'
working-directory: infra
- name: Diff
if: github.ref_name != 'main'
run: npx cdk diff --require-approval=never '${{ inputs.env }}/**'
run: npx cdk diff --require-approval=never --exclusively '${{ inputs.env }}/${{ inputs.stacks }}'
working-directory: infra

0 comments on commit 0fd54dd

Please sign in to comment.