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