Skip to content

Commit 9dc3492

Browse files
committed
fix: update deploy workflow to validate outputs
1 parent cffc78c commit 9dc3492

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,11 @@ jobs:
7070
bundle exec rake build
7171
7272
- name: Validate Outputs
73-
uses: actions/github-script@v6
74-
with:
75-
script: |
76-
const bucketName = steps.terragrunt_output.outputs.bucket_name;
77-
const distributionId = steps.terragrunt_output.outputs.distribution_id;
78-
79-
if (!bucketName || !distributionId) {
80-
core.setFailed('Required outputs not found');
81-
}
73+
run: |
74+
echo "Verifying CloudFront Distribution..."
75+
aws cloudfront get-distribution --id "${{ steps.terragrunt_output.outputs.distribution_id }}"
76+
echo "\nVerifying S3 Bucket..."
77+
aws s3 ls | grep "${{ steps.terragrunt_output.outputs.bucket_name }}"
8278
8379
- name: Copy output to S3
8480
run: aws s3 sync ./_site/ s3://${{ steps.terragrunt_output.outputs.bucket_name }} --acl public-read --delete --cache-control max-age=604800

0 commit comments

Comments
 (0)