Skip to content

Commit 96472a2

Browse files
authored
fix: update deploy workflow to --chdir instead of --terragrunt-working-dir (#230)
1 parent 9aa1546 commit 96472a2

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name: Deploy
33
on:
44
push:
55
branches: [ main, master ]
6-
76
workflow_dispatch:
87

98
env:
@@ -12,7 +11,6 @@ env:
1211
AWS_DEFAULT_REGION: us-east-1
1312
TG_WORKING_DIR: terragrunt/live/website
1413

15-
# configure concurrency to prevent multiple runs at the same time
1614
concurrency:
1715
group: ${{ github.workflow }}
1816

@@ -43,19 +41,19 @@ jobs:
4341
- name: Upgrade Provider
4442
run: |
4543
echo "Upgrading AWS provider..."
46-
terragrunt init --terragrunt-working-dir $TG_WORKING_DIR --upgrade
44+
terragrunt init --chdir $TG_WORKING_DIR --upgrade
4745
4846
- name: Terragrunt Plan
49-
run: terragrunt plan --terragrunt-working-dir $TG_WORKING_DIR
47+
run: terragrunt plan --chdir $TG_WORKING_DIR
5048

5149
- name: Terragrunt Apply
52-
run: terragrunt apply -auto-approve --terragrunt-working-dir $TG_WORKING_DIR
50+
run: terragrunt apply -auto-approve --chdir $TG_WORKING_DIR
5351

5452
- name: Terragrunt Output
5553
id: terraform
5654
run: |
57-
printf "distribution_id=%s\n" $(terragrunt output --terragrunt-working-dir $TG_WORKING_DIR distribution_id) >> "$GITHUB_OUTPUT"
58-
printf "bucket_name=%s\n" $(terragrunt output --terragrunt-working-dir $TG_WORKING_DIR bucket_name) >> "$GITHUB_OUTPUT"
55+
printf "distribution_id=%s\n" $(terragrunt output --chdir $TG_WORKING_DIR distribution_id) >> "$GITHUB_OUTPUT"
56+
printf "bucket_name=%s\n" $(terragrunt output --chdir $TG_WORKING_DIR bucket_name) >> "$GITHUB_OUTPUT"
5957
6058
- name: Build Jekyll project
6159
run: bundle exec rake build
@@ -65,4 +63,3 @@ jobs:
6563

6664
- name: Invalidate Cloudfront
6765
run: aws cloudfront create-invalidation --distribution-id ${{ steps.terraform.outputs.distribution_id }} --paths "/*"
68-

0 commit comments

Comments
 (0)