From 64f6c40ca33475562d204e3bfc62b8d954a55b66 Mon Sep 17 00:00:00 2001 From: j4y <36337+j4y@users.noreply.github.com> Date: Mon, 3 Nov 2025 22:48:42 -0500 Subject: [PATCH 01/32] chore: tweak deploy workflow to support deploy-* branches --- .github/workflows/deploy.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7fae2f7..75400ea 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,7 +2,10 @@ name: Deploy on: push: - branches: [ main, master ] + branches: + - main + # branches that match deploy-* will deploy as well + - deploy-* workflow_dispatch: env: From df8d2494102944515870752955ed455c5d6089b7 Mon Sep 17 00:00:00 2001 From: j4y <36337+j4y@users.noreply.github.com> Date: Mon, 3 Nov 2025 22:52:30 -0500 Subject: [PATCH 02/32] fixup --- .github/workflows/deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 75400ea..887ad72 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -44,6 +44,7 @@ jobs: - name: Update Terraform State and Providers run: | cd "$TG_WORKING_DIR" + ls -la terragrunt init --upgrade - name: Terragrunt Plan From 45067fab8fdf32f46d9403fa17228ec497715ecb Mon Sep 17 00:00:00 2001 From: j4y <36337+j4y@users.noreply.github.com> Date: Tue, 4 Nov 2025 20:07:15 -0500 Subject: [PATCH 03/32] test --- .github/workflows/deploy.yml | 13 ++----------- mise.toml | 2 ++ 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 887ad72..d50898c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -29,17 +29,8 @@ jobs: with: bundler-cache: true - - name: Setup Terraform - uses: hashicorp/setup-terraform@v3.1.2 - with: - terraform_version: 1.13.4 - terraform_wrapper: true - - - name: Setup Terragrunt - uses: autero1/action-terragrunt@v3.0.2 - with: - terragrunt-version: 0.86.0 - token: ${{ secrets.GITHUB_TOKEN }} + - name: Install Terragrunt and OpenTofu + uses: gruntwork-io/terragrunt-action@v3 - name: Update Terraform State and Providers run: | diff --git a/mise.toml b/mise.toml index 0a61537..c2ebf11 100644 --- a/mise.toml +++ b/mise.toml @@ -1,2 +1,4 @@ [tools] ruby = '3.3.9' +terragrunt = "0.86.0" +opentofu = "1.10.1" From 654265fb9c395d72d8543a200d9f1895b60357ee Mon Sep 17 00:00:00 2001 From: j4y <36337+j4y@users.noreply.github.com> Date: Tue, 4 Nov 2025 20:13:40 -0500 Subject: [PATCH 04/32] fixup --- .github/workflows/deploy.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d50898c..9b99194 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,6 +24,16 @@ jobs: steps: - uses: actions/checkout@v5 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + + steps: + - uses: actions/checkout@v5 + with: + submodules: true + - name: Set up Ruby uses: ruby/setup-ruby@v1 with: @@ -31,6 +41,9 @@ jobs: - name: Install Terragrunt and OpenTofu uses: gruntwork-io/terragrunt-action@v3 + with: + terraform_version: '1.13.4' + terragrunt_version: '0.86.0' - name: Update Terraform State and Providers run: | From 21bfd8064dc84fcccd04da546a89286833a18328 Mon Sep 17 00:00:00 2001 From: j4y <36337+j4y@users.noreply.github.com> Date: Tue, 4 Nov 2025 20:16:57 -0500 Subject: [PATCH 05/32] fixup --- .github/workflows/deploy.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9b99194..38b7f04 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,16 +24,6 @@ jobs: steps: - uses: actions/checkout@v5 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - bundler-cache: true - - steps: - - uses: actions/checkout@v5 - with: - submodules: true - - name: Set up Ruby uses: ruby/setup-ruby@v1 with: From 0a6a5e1c4106224b12ad2b55d2d112d6071f2f2e Mon Sep 17 00:00:00 2001 From: j4y <36337+j4y@users.noreply.github.com> Date: Tue, 4 Nov 2025 20:18:35 -0500 Subject: [PATCH 06/32] fixup --- mise.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mise.toml b/mise.toml index c2ebf11..c0364d5 100644 --- a/mise.toml +++ b/mise.toml @@ -1,4 +1,4 @@ [tools] ruby = '3.3.9' -terragrunt = "0.86.0" -opentofu = "1.10.1" +terragrunt = "0.55.18"" +terraform = "1.5.7" From 2473c1d45aaa5fa9b3dba5d08ca6f8053d5289f9 Mon Sep 17 00:00:00 2001 From: j4y <36337+j4y@users.noreply.github.com> Date: Tue, 4 Nov 2025 20:22:06 -0500 Subject: [PATCH 07/32] fixup --- .github/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 38b7f04..adf603c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -32,8 +32,8 @@ jobs: - name: Install Terragrunt and OpenTofu uses: gruntwork-io/terragrunt-action@v3 with: - terraform_version: '1.13.4' - terragrunt_version: '0.86.0' + tg_version: '0.55.18' + tofu_version: '1.6.2' - name: Update Terraform State and Providers run: | From 9f46ec26f0857acbc1112a113fd3ce7469680753 Mon Sep 17 00:00:00 2001 From: j4y <36337+j4y@users.noreply.github.com> Date: Tue, 4 Nov 2025 20:23:50 -0500 Subject: [PATCH 08/32] fix mise --- .github/workflows/deploy.yml | 2 +- mise.toml | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index adf603c..2c76255 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -18,7 +18,7 @@ concurrency: group: ${{ github.workflow }} jobs: - build: + deploy: runs-on: ubuntu-latest steps: diff --git a/mise.toml b/mise.toml index c0364d5..0a61537 100644 --- a/mise.toml +++ b/mise.toml @@ -1,4 +1,2 @@ [tools] ruby = '3.3.9' -terragrunt = "0.55.18"" -terraform = "1.5.7" From 738e11486eeae9a46b97dc8292564ffaba623c3e Mon Sep 17 00:00:00 2001 From: j4y <36337+j4y@users.noreply.github.com> Date: Tue, 4 Nov 2025 20:30:42 -0500 Subject: [PATCH 09/32] update --- .github/workflows/deploy.yml | 8 -------- mise.toml | 2 ++ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2c76255..45d4337 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,16 +24,8 @@ jobs: steps: - uses: actions/checkout@v5 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - bundler-cache: true - - name: Install Terragrunt and OpenTofu uses: gruntwork-io/terragrunt-action@v3 - with: - tg_version: '0.55.18' - tofu_version: '1.6.2' - name: Update Terraform State and Providers run: | diff --git a/mise.toml b/mise.toml index 0a61537..97d231b 100644 --- a/mise.toml +++ b/mise.toml @@ -1,2 +1,4 @@ [tools] ruby = '3.3.9' +terragrunt = '0.55.18' +opentofu = '1.6.2' From 8c6cd9df51416088e79053469f0c74f2c7ee0ad6 Mon Sep 17 00:00:00 2001 From: j4y <36337+j4y@users.noreply.github.com> Date: Tue, 4 Nov 2025 20:38:20 -0500 Subject: [PATCH 10/32] fixup --- .github/workflows/deploy.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 45d4337..bbc3cd6 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,14 +24,11 @@ jobs: steps: - uses: actions/checkout@v5 - - name: Install Terragrunt and OpenTofu - uses: gruntwork-io/terragrunt-action@v3 - - name: Update Terraform State and Providers - run: | - cd "$TG_WORKING_DIR" - ls -la - terragrunt init --upgrade + uses: gruntwork-io/terragrunt-action@v3 + with: + tg_dir: "$TG_WORKING_DIR" + tg_command: init --upgrade - name: Terragrunt Plan run: terragrunt plan --chdir $TG_WORKING_DIR From 9235ae190f83d7c06f707f8e45b3f11efb4c00cd Mon Sep 17 00:00:00 2001 From: j4y <36337+j4y@users.noreply.github.com> Date: Tue, 4 Nov 2025 20:40:55 -0500 Subject: [PATCH 11/32] mise --- mise.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mise.toml b/mise.toml index 97d231b..573def9 100644 --- a/mise.toml +++ b/mise.toml @@ -1,4 +1,4 @@ [tools] ruby = '3.3.9' -terragrunt = '0.55.18' +terragrunt = '0.86.0' opentofu = '1.6.2' From afba8536edab3af58e1caf1e6476362656536c8e Mon Sep 17 00:00:00 2001 From: j4y <36337+j4y@users.noreply.github.com> Date: Tue, 4 Nov 2025 20:47:35 -0500 Subject: [PATCH 12/32] fiuxp --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index bbc3cd6..308df35 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -27,7 +27,7 @@ jobs: - name: Update Terraform State and Providers uses: gruntwork-io/terragrunt-action@v3 with: - tg_dir: "$TG_WORKING_DIR" + tg_dir: "${TG_WORKING_DIR}" tg_command: init --upgrade - name: Terragrunt Plan From 9c0976b18392dde21577da18c519824487a20148 Mon Sep 17 00:00:00 2001 From: j4y <36337+j4y@users.noreply.github.com> Date: Tue, 4 Nov 2025 20:51:21 -0500 Subject: [PATCH 13/32] test --- .github/workflows/deploy.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 308df35..380c63e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -27,11 +27,14 @@ jobs: - name: Update Terraform State and Providers uses: gruntwork-io/terragrunt-action@v3 with: - tg_dir: "${TG_WORKING_DIR}" + tg_dir: $TG_WORKING_DIR tg_command: init --upgrade - name: Terragrunt Plan - run: terragrunt plan --chdir $TG_WORKING_DIR + uses: gruntwork-io/terragrunt-action@v3 + with: + tg_dir: $TG_WORKING_DIR + tg_command: plan - name: Terragrunt Apply run: terragrunt apply -auto-approve --chdir $TG_WORKING_DIR From 9b08f832ed3a83272e87b3d7aa867da86af98edf Mon Sep 17 00:00:00 2001 From: j4y <36337+j4y@users.noreply.github.com> Date: Tue, 4 Nov 2025 20:55:25 -0500 Subject: [PATCH 14/32] fix --- .github/workflows/deploy.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 380c63e..2a7680a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -27,17 +27,20 @@ jobs: - name: Update Terraform State and Providers uses: gruntwork-io/terragrunt-action@v3 with: - tg_dir: $TG_WORKING_DIR + tg_dir: ${{ github.workspace }}/terragrunt/live/website tg_command: init --upgrade - name: Terragrunt Plan uses: gruntwork-io/terragrunt-action@v3 with: - tg_dir: $TG_WORKING_DIR + tg_dir: ${{ github.workspace }}/terragrunt/live/website tg_command: plan - name: Terragrunt Apply - run: terragrunt apply -auto-approve --chdir $TG_WORKING_DIR + uses: gruntwork-io/terragrunt-action@v3 + with: + tg_dir: ${{ github.workspace }}/terragrunt/live/website + tg_command: apply -auto-approve - name: Terragrunt Output id: terraform From aa1c8696807d54ed7cb2395344c7a61d7c0d8197 Mon Sep 17 00:00:00 2001 From: j4y <36337+j4y@users.noreply.github.com> Date: Tue, 4 Nov 2025 20:57:02 -0500 Subject: [PATCH 15/32] fix --- .github/workflows/deploy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2a7680a..244db16 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -27,19 +27,19 @@ jobs: - name: Update Terraform State and Providers uses: gruntwork-io/terragrunt-action@v3 with: - tg_dir: ${{ github.workspace }}/terragrunt/live/website + tg_dir: terragrunt/live/website tg_command: init --upgrade - name: Terragrunt Plan uses: gruntwork-io/terragrunt-action@v3 with: - tg_dir: ${{ github.workspace }}/terragrunt/live/website + tg_dir: terragrunt/live/website tg_command: plan - name: Terragrunt Apply uses: gruntwork-io/terragrunt-action@v3 with: - tg_dir: ${{ github.workspace }}/terragrunt/live/website + tg_dir: terragrunt/live/website tg_command: apply -auto-approve - name: Terragrunt Output From 17b66027ba38e2c9505c5a6ebcd9359e33f2ea35 Mon Sep 17 00:00:00 2001 From: j4y <36337+j4y@users.noreply.github.com> Date: Tue, 4 Nov 2025 21:01:39 -0500 Subject: [PATCH 16/32] fixup --- .github/workflows/deploy.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 244db16..76428d5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -26,20 +26,26 @@ jobs: - name: Update Terraform State and Providers uses: gruntwork-io/terragrunt-action@v3 + env: + TF_LOG: DEBUG + INPUT_PRE_EXEC_1: | + echo "Current directory: $(pwd)" + ls -la + git status with: - tg_dir: terragrunt/live/website + tg_dir: ./terragrunt/live/website tg_command: init --upgrade - name: Terragrunt Plan uses: gruntwork-io/terragrunt-action@v3 with: - tg_dir: terragrunt/live/website + tg_dir: ./terragrunt/live/website tg_command: plan - name: Terragrunt Apply uses: gruntwork-io/terragrunt-action@v3 with: - tg_dir: terragrunt/live/website + tg_dir: ./terragrunt/live/website tg_command: apply -auto-approve - name: Terragrunt Output From 2e5d6f5027eacd6dd9d336fa6e5ca2df8c5ef6d5 Mon Sep 17 00:00:00 2001 From: j4y <36337+j4y@users.noreply.github.com> Date: Tue, 4 Nov 2025 21:09:03 -0500 Subject: [PATCH 17/32] fixup --- .github/workflows/deploy.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 76428d5..583d9c8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -12,11 +12,13 @@ env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_DEFAULT_REGION: us-east-1 - TG_WORKING_DIR: terragrunt/live/website + working_dir: terragrunt/live/website concurrency: group: ${{ github.workflow }} + + jobs: deploy: runs-on: ubuntu-latest @@ -33,19 +35,19 @@ jobs: ls -la git status with: - tg_dir: ./terragrunt/live/website + tg_dir: ${{ env.working_dir }} tg_command: init --upgrade - name: Terragrunt Plan uses: gruntwork-io/terragrunt-action@v3 with: - tg_dir: ./terragrunt/live/website + tg_dir: ${{ env.working_dir }} tg_command: plan - name: Terragrunt Apply uses: gruntwork-io/terragrunt-action@v3 with: - tg_dir: ./terragrunt/live/website + tg_dir: ${{ env.working_dir }} tg_command: apply -auto-approve - name: Terragrunt Output From ae493c74de20e0770a08010fb5ebf7c3fa46e50a Mon Sep 17 00:00:00 2001 From: j4y <36337+j4y@users.noreply.github.com> Date: Tue, 4 Nov 2025 21:19:15 -0500 Subject: [PATCH 18/32] test --- .github/workflows/deploy.yml | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 583d9c8..ed8140e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -50,17 +50,31 @@ jobs: tg_dir: ${{ env.working_dir }} tg_command: apply -auto-approve - - name: Terragrunt Output - id: terraform - run: | - printf "distribution_id=%s\n" $(terragrunt output --chdir $TG_WORKING_DIR distribution_id) >> "$GITHUB_OUTPUT" - printf "bucket_name=%s\n" $(terragrunt output --chdir $TG_WORKING_DIR bucket_name) >> "$GITHUB_OUTPUT" + - name: Get bucket name + uses: gruntwork-io/terragrunt-action@v3 + id: get_bucket_name + with: + tg_dir: ${{ env.TG_WORKING_DIR }} + tg_command: 'output bucket_name' + + - name: Get distribution id + uses: gruntwork-io/terragrunt-action@v3 + id: get_distribution_id + with: + tg_dir: ${{ env.TG_WORKING_DIR }} + tg_command: 'output distribution_id' + + # - name: Terragrunt Output + # id: terraform + # run: | + # printf "distribution_id=%s\n" $(terragrunt output --chdir $TG_WORKING_DIR distribution_id) >> "$GITHUB_OUTPUT" + # printf "bucket_name=%s\n" $(terragrunt output --chdir $TG_WORKING_DIR bucket_name) >> "$GITHUB_OUTPUT" - name: Build Jekyll project run: bundle exec rake build - name: Copy output to S3 - run: aws s3 sync ./_site/ s3://${{ steps.terraform.outputs.bucket_name }} --acl public-read --delete --cache-control max-age=604800 + run: aws s3 sync ./_site/ s3://${{ steps.get_bucket_name.outputs.tg_action_output }} --acl public-read --delete --cache-control max-age=604800 - name: Invalidate Cloudfront - run: aws cloudfront create-invalidation --distribution-id ${{ steps.terraform.outputs.distribution_id }} --paths "/*" + run: aws cloudfront create-invalidation --distribution-id ${{ steps.get_distribution_id.outputs.tg_action_output }} --paths "/*" From ba4ab29cd4660aaaf5fff08841f1e18fa805c914 Mon Sep 17 00:00:00 2001 From: j4y <36337+j4y@users.noreply.github.com> Date: Tue, 4 Nov 2025 21:21:14 -0500 Subject: [PATCH 19/32] fixup --- .github/workflows/deploy.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ed8140e..bfcfa01 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -54,15 +54,15 @@ jobs: uses: gruntwork-io/terragrunt-action@v3 id: get_bucket_name with: - tg_dir: ${{ env.TG_WORKING_DIR }} - tg_command: 'output bucket_name' + tg_dir: ${{ env.working_dir }} + tg_command: output bucket_name - name: Get distribution id uses: gruntwork-io/terragrunt-action@v3 id: get_distribution_id with: - tg_dir: ${{ env.TG_WORKING_DIR }} - tg_command: 'output distribution_id' + tg_dir: ${{ env.working_dir }} + tg_command: output distribution_id # - name: Terragrunt Output # id: terraform From 78a5bb9441b7a39013ca7f7b5d2de3abad0262a5 Mon Sep 17 00:00:00 2001 From: j4y <36337+j4y@users.noreply.github.com> Date: Tue, 4 Nov 2025 21:27:44 -0500 Subject: [PATCH 20/32] deploy --- .github/workflows/deploy.yml | 38 +++++++++++++++++------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index bfcfa01..a1dcd3a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,8 +17,6 @@ env: concurrency: group: ${{ github.workflow }} - - jobs: deploy: runs-on: ubuntu-latest @@ -50,19 +48,19 @@ jobs: tg_dir: ${{ env.working_dir }} tg_command: apply -auto-approve - - name: Get bucket name - uses: gruntwork-io/terragrunt-action@v3 - id: get_bucket_name - with: - tg_dir: ${{ env.working_dir }} - tg_command: output bucket_name + # - name: Get bucket name + # uses: gruntwork-io/terragrunt-action@v3 + # id: get_bucket_name + # with: + # tg_dir: ${{ env.working_dir }} + # tg_command: output bucket_name - - name: Get distribution id - uses: gruntwork-io/terragrunt-action@v3 - id: get_distribution_id - with: - tg_dir: ${{ env.working_dir }} - tg_command: output distribution_id + # - name: Get distribution id + # uses: gruntwork-io/terragrunt-action@v3 + # id: get_distribution_id + # with: + # tg_dir: ${{ env.working_dir }} + # tg_command: output distribution_id # - name: Terragrunt Output # id: terraform @@ -70,11 +68,11 @@ jobs: # printf "distribution_id=%s\n" $(terragrunt output --chdir $TG_WORKING_DIR distribution_id) >> "$GITHUB_OUTPUT" # printf "bucket_name=%s\n" $(terragrunt output --chdir $TG_WORKING_DIR bucket_name) >> "$GITHUB_OUTPUT" - - name: Build Jekyll project - run: bundle exec rake build + # - name: Build Jekyll project + # run: bundle exec rake build - - name: Copy output to S3 - run: aws s3 sync ./_site/ s3://${{ steps.get_bucket_name.outputs.tg_action_output }} --acl public-read --delete --cache-control max-age=604800 + # - name: Copy output to S3 + # run: aws s3 sync ./_site/ s3://${{ steps.get_bucket_name.outputs.tg_action_output }} --acl public-read --delete --cache-control max-age=604800 - - name: Invalidate Cloudfront - run: aws cloudfront create-invalidation --distribution-id ${{ steps.get_distribution_id.outputs.tg_action_output }} --paths "/*" + # - name: Invalidate Cloudfront + # run: aws cloudfront create-invalidation --distribution-id ${{ steps.get_distribution_id.outputs.tg_action_output }} --paths "/*" From c6b579f22d67ce33225bc362d612575a3c6cbfa0 Mon Sep 17 00:00:00 2001 From: j4y <36337+j4y@users.noreply.github.com> Date: Tue, 4 Nov 2025 21:35:18 -0500 Subject: [PATCH 21/32] chore: remove -auto-approve from terragrunt apply command --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a1dcd3a..30b0bc3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -46,7 +46,7 @@ jobs: uses: gruntwork-io/terragrunt-action@v3 with: tg_dir: ${{ env.working_dir }} - tg_command: apply -auto-approve + tg_command: apply # - name: Get bucket name # uses: gruntwork-io/terragrunt-action@v3 From 7184cbd5fc5581c2b2ea11da8a44e9b0949b6860 Mon Sep 17 00:00:00 2001 From: j4y <36337+j4y@users.noreply.github.com> Date: Tue, 4 Nov 2025 21:41:07 -0500 Subject: [PATCH 22/32] outputs --- .github/workflows/deploy.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 30b0bc3..f5355bc 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -48,6 +48,15 @@ jobs: tg_dir: ${{ env.working_dir }} tg_command: apply + - name: Terragrunt Outputs + uses: gruntwork-io/terragrunt-action@v3 + id: terragrunt_outputs + with: + tg_dir: ${{ env.working_dir }} + tg_command: output distribution_id bucket_name + + + # - name: Get bucket name # uses: gruntwork-io/terragrunt-action@v3 # id: get_bucket_name @@ -68,8 +77,8 @@ jobs: # printf "distribution_id=%s\n" $(terragrunt output --chdir $TG_WORKING_DIR distribution_id) >> "$GITHUB_OUTPUT" # printf "bucket_name=%s\n" $(terragrunt output --chdir $TG_WORKING_DIR bucket_name) >> "$GITHUB_OUTPUT" - # - name: Build Jekyll project - # run: bundle exec rake build + - name: Build Jekyll project + run: bundle exec rake build # - name: Copy output to S3 # run: aws s3 sync ./_site/ s3://${{ steps.get_bucket_name.outputs.tg_action_output }} --acl public-read --delete --cache-control max-age=604800 From 7bb323029806f040089ad339950b01e97f86a83a Mon Sep 17 00:00:00 2001 From: j4y <36337+j4y@users.noreply.github.com> Date: Tue, 4 Nov 2025 21:43:00 -0500 Subject: [PATCH 23/32] fail --- .github/workflows/deploy.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f5355bc..c4f0b5e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -48,14 +48,12 @@ jobs: tg_dir: ${{ env.working_dir }} tg_command: apply - - name: Terragrunt Outputs + - name: Terragrunt Output uses: gruntwork-io/terragrunt-action@v3 id: terragrunt_outputs with: tg_dir: ${{ env.working_dir }} - tg_command: output distribution_id bucket_name - - + tg_command: output # - name: Get bucket name # uses: gruntwork-io/terragrunt-action@v3 @@ -80,8 +78,8 @@ jobs: - name: Build Jekyll project run: bundle exec rake build - # - name: Copy output to S3 - # run: aws s3 sync ./_site/ s3://${{ steps.get_bucket_name.outputs.tg_action_output }} --acl public-read --delete --cache-control max-age=604800 + - name: Copy output to S3 + run: aws s3 sync ./_site/ s3://${{ steps.terragrunt_outputs.outputs.tg_action_output }} --acl public-read --delete --cache-control max-age=604800 # - name: Invalidate Cloudfront # run: aws cloudfront create-invalidation --distribution-id ${{ steps.get_distribution_id.outputs.tg_action_output }} --paths "/*" From 0c98a77b972a968c96582bd4bde3f01a06cff6f5 Mon Sep 17 00:00:00 2001 From: j4y <36337+j4y@users.noreply.github.com> Date: Tue, 4 Nov 2025 21:47:20 -0500 Subject: [PATCH 24/32] fail --- .github/workflows/deploy.yml | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c4f0b5e..655fce8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -55,31 +55,13 @@ jobs: tg_dir: ${{ env.working_dir }} tg_command: output - # - name: Get bucket name - # uses: gruntwork-io/terragrunt-action@v3 - # id: get_bucket_name - # with: - # tg_dir: ${{ env.working_dir }} - # tg_command: output bucket_name - - # - name: Get distribution id - # uses: gruntwork-io/terragrunt-action@v3 - # id: get_distribution_id - # with: - # tg_dir: ${{ env.working_dir }} - # tg_command: output distribution_id - - # - name: Terragrunt Output - # id: terraform - # run: | - # printf "distribution_id=%s\n" $(terragrunt output --chdir $TG_WORKING_DIR distribution_id) >> "$GITHUB_OUTPUT" - # printf "bucket_name=%s\n" $(terragrunt output --chdir $TG_WORKING_DIR bucket_name) >> "$GITHUB_OUTPUT" - - name: Build Jekyll project - run: bundle exec rake build + run: | + bundle install + bundle exec rake build - name: Copy output to S3 run: aws s3 sync ./_site/ s3://${{ steps.terragrunt_outputs.outputs.tg_action_output }} --acl public-read --delete --cache-control max-age=604800 - # - name: Invalidate Cloudfront - # run: aws cloudfront create-invalidation --distribution-id ${{ steps.get_distribution_id.outputs.tg_action_output }} --paths "/*" + - name: Invalidate Cloudfront + run: aws cloudfront create-invalidation --distribution-id ${{ steps.terragrunt_outputs.outputs.tg_action_output }} --paths "/*" From 883aa2843e52874404c1abaa6b3ac4759cbf59a8 Mon Sep 17 00:00:00 2001 From: j4y <36337+j4y@users.noreply.github.com> Date: Tue, 4 Nov 2025 21:57:11 -0500 Subject: [PATCH 25/32] fixes --- .github/workflows/deploy.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 655fce8..c42e9b1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -50,7 +50,7 @@ jobs: - name: Terragrunt Output uses: gruntwork-io/terragrunt-action@v3 - id: terragrunt_outputs + id: terragrunt_output with: tg_dir: ${{ env.working_dir }} tg_command: output @@ -60,8 +60,11 @@ jobs: bundle install bundle exec rake build + # TODO: fail workflow if bucket name or distribution_id is not found + + - name: Copy output to S3 - run: aws s3 sync ./_site/ s3://${{ steps.terragrunt_outputs.outputs.tg_action_output }} --acl public-read --delete --cache-control max-age=604800 + run: aws s3 sync ./_site/ s3://${{ steps.terragrunt_step.outputs.bucket_name }} --acl public-read --delete --cache-control max-age=604800 - name: Invalidate Cloudfront - run: aws cloudfront create-invalidation --distribution-id ${{ steps.terragrunt_outputs.outputs.tg_action_output }} --paths "/*" + run: aws cloudfront create-invalidation --distribution-id ${{ steps.terragrunt_step.outputs.distribution_id }} --paths "/*" From bf904399cfcd93f6cef5e027a8ceaad9a68a1c96 Mon Sep 17 00:00:00 2001 From: j4y <36337+j4y@users.noreply.github.com> Date: Tue, 4 Nov 2025 21:58:38 -0500 Subject: [PATCH 26/32] fixup --- .github/workflows/deploy.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c42e9b1..0524850 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -26,12 +26,12 @@ jobs: - name: Update Terraform State and Providers uses: gruntwork-io/terragrunt-action@v3 - env: - TF_LOG: DEBUG - INPUT_PRE_EXEC_1: | - echo "Current directory: $(pwd)" - ls -la - git status + # env: + # TF_LOG: DEBUG + # INPUT_PRE_EXEC_1: | + # echo "Current directory: $(pwd)" + # ls -la + # git status with: tg_dir: ${{ env.working_dir }} tg_command: init --upgrade From dabb5967e2820f28ac9b724678f12d60c01324e2 Mon Sep 17 00:00:00 2001 From: j4y <36337+j4y@users.noreply.github.com> Date: Tue, 4 Nov 2025 22:02:08 -0500 Subject: [PATCH 27/32] fixup --- .github/workflows/deploy.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0524850..1367b69 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -51,6 +51,9 @@ jobs: - name: Terragrunt Output uses: gruntwork-io/terragrunt-action@v3 id: terragrunt_output + env: + TERRAGRUNT_FORWARD_TF_STDOUT: 1 + TERRAGRUNT_NO_COLOR: 1 with: tg_dir: ${{ env.working_dir }} tg_command: output @@ -62,7 +65,6 @@ jobs: # TODO: fail workflow if bucket name or distribution_id is not found - - name: Copy output to S3 run: aws s3 sync ./_site/ s3://${{ steps.terragrunt_step.outputs.bucket_name }} --acl public-read --delete --cache-control max-age=604800 From d9eb3e35379a51cc30a1f77bc7decd092d3475c3 Mon Sep 17 00:00:00 2001 From: j4y <36337+j4y@users.noreply.github.com> Date: Tue, 4 Nov 2025 22:04:23 -0500 Subject: [PATCH 28/32] fixup --- .github/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1367b69..8596a7f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -52,8 +52,8 @@ jobs: uses: gruntwork-io/terragrunt-action@v3 id: terragrunt_output env: - TERRAGRUNT_FORWARD_TF_STDOUT: 1 - TERRAGRUNT_NO_COLOR: 1 + TG_TF_FORWARD_STDOUT: 1 + TG_NO_COLOR: 1 with: tg_dir: ${{ env.working_dir }} tg_command: output From fa07666079b4cc2d4f9c607b5c3a70ddf18a5e2f Mon Sep 17 00:00:00 2001 From: j4y <36337+j4y@users.noreply.github.com> Date: Tue, 4 Nov 2025 22:09:32 -0500 Subject: [PATCH 29/32] fixup --- .github/workflows/deploy.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8596a7f..429416b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -58,6 +58,11 @@ jobs: tg_dir: ${{ env.working_dir }} tg_command: output + - name: Read Values + run: | + echo "Bucket Name: ${{ steps.terragrunt_step.outputs.bucket_name }}" + echo "Distribution ID: ${{ steps.terragrunt_step.outputs.distribution_id }} + - name: Build Jekyll project run: | bundle install From 540b0fb011411628d33cf2909abb1f33359466ed Mon Sep 17 00:00:00 2001 From: j4y <36337+j4y@users.noreply.github.com> Date: Tue, 4 Nov 2025 22:14:38 -0500 Subject: [PATCH 30/32] fixup --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 429416b..85773ef 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -60,7 +60,7 @@ jobs: - name: Read Values run: | - echo "Bucket Name: ${{ steps.terragrunt_step.outputs.bucket_name }}" + terragrunt output bucket_name echo "Distribution ID: ${{ steps.terragrunt_step.outputs.distribution_id }} - name: Build Jekyll project From d118102a582f37d2914ff760e0ccdc9a53977887 Mon Sep 17 00:00:00 2001 From: j4y <36337+j4y@users.noreply.github.com> Date: Tue, 4 Nov 2025 22:16:49 -0500 Subject: [PATCH 31/32] fixup --- .github/workflows/deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 85773ef..5644a12 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -60,6 +60,7 @@ jobs: - name: Read Values run: | + cd terragrunt/live/website terragrunt output bucket_name echo "Distribution ID: ${{ steps.terragrunt_step.outputs.distribution_id }} From aa2420d4d19cdb7af2127cccf484c80cc1c2797a Mon Sep 17 00:00:00 2001 From: j4y <36337+j4y@users.noreply.github.com> Date: Tue, 4 Nov 2025 22:22:22 -0500 Subject: [PATCH 32/32] fixup --- .github/workflows/deploy.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5644a12..d781c3c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -48,21 +48,21 @@ jobs: tg_dir: ${{ env.working_dir }} tg_command: apply - - name: Terragrunt Output - uses: gruntwork-io/terragrunt-action@v3 - id: terragrunt_output - env: - TG_TF_FORWARD_STDOUT: 1 - TG_NO_COLOR: 1 - with: - tg_dir: ${{ env.working_dir }} - tg_command: output + # - name: Terragrunt Output + # uses: gruntwork-io/terragrunt-action@v3 + # env: + # TG_TF_FORWARD_STDOUT: 1 + # TG_NO_COLOR: 1 + # with: + # tg_dir: ${{ env.working_dir }} + # tg_command: output - name: Read Values + id: terragrunt_output run: | cd terragrunt/live/website - terragrunt output bucket_name - echo "Distribution ID: ${{ steps.terragrunt_step.outputs.distribution_id }} + printf "distribution_id=%s\n" $(terragrunt output distribution_id) >> "$GITHUB_OUTPUT" + printf "bucket_name=%s\n" $(terragrunt output bucket_name) >> "$GITHUB_OUTPUT" - name: Build Jekyll project run: | @@ -72,7 +72,7 @@ jobs: # TODO: fail workflow if bucket name or distribution_id is not found - name: Copy output to S3 - run: aws s3 sync ./_site/ s3://${{ steps.terragrunt_step.outputs.bucket_name }} --acl public-read --delete --cache-control max-age=604800 + run: aws s3 sync ./_site/ s3://${{ steps.terragrunt_output.outputs.bucket_name }} --acl public-read --delete --cache-control max-age=604800 - name: Invalidate Cloudfront - run: aws cloudfront create-invalidation --distribution-id ${{ steps.terragrunt_step.outputs.distribution_id }} --paths "/*" + run: aws cloudfront create-invalidation --distribution-id ${{ steps.terragrunt_output.outputs.distribution_id }} --paths "/*"