Skip to content

Commit

Permalink
ci: Run cdk synth before deploy in GH action workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
topher-lo committed Mar 17, 2024
1 parent c7228df commit 2c73670
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/deploy-aws-cdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
deploy:
name: Deploy FastAPI
name: Deploy AWS CDK Stack
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
Expand Down Expand Up @@ -42,8 +42,11 @@ jobs:
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements-cdk.txt
- name: CDK synth
run: cdk synth --app "python3 aws_cdk_app.py"

- name: CDK bootstrap
run: cdk bootstrap --app "python3 aws_cdk_app.py"
run: cdk bootstrap --app cdk.out

- name: CDK deploy
run: cdk deploy --app "python3 aws_cdk_app.py" --require-approval never
run: cdk deploy --app cdk.out --require-approval never
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# CDK stack
cdk.out/

# Database
db.sqlite3

Expand Down

0 comments on commit 2c73670

Please sign in to comment.