From ca74439b8a04e96108e469086364e924952b9cf0 Mon Sep 17 00:00:00 2001 From: j4y <36337+j4y@users.noreply.github.com> Date: Tue, 4 Nov 2025 22:57:38 -0500 Subject: [PATCH] chore: validate bucket name and distribution id using github script --- .github/workflows/deploy.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d781c3c..2e9d273 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -69,7 +69,16 @@ jobs: bundle install bundle exec rake build - # TODO: fail workflow if bucket name or distribution_id is not found + - name: Validate Outputs + uses: actions/github-script@v6 + with: + script: | + const bucketName = steps.terragrunt_output.outputs.bucket_name; + const distributionId = steps.terragrunt_output.outputs.distribution_id; + + if (!bucketName || !distributionId) { + core.setFailed('Required outputs not found'); + } - name: Copy output to S3 run: aws s3 sync ./_site/ s3://${{ steps.terragrunt_output.outputs.bucket_name }} --acl public-read --delete --cache-control max-age=604800