Skip to content

Commit

Permalink
DEVPROD-5097: Prevent deploy_to_prod task from failing silently (ever…
Browse files Browse the repository at this point in the history
  • Loading branch information
minnakt authored Feb 26, 2024
1 parent 7ee3037 commit 3c3bf1f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions scripts/deploy/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#!/bin/sh
#!/bin/bash

# This script runs the aws cli command to deploy the app to s3
# This script runs the AWS CLI command to deploy the app to S3.

# Try this step and throw an error if it fails
echo "Deploying to S3"
aws s3 sync build/ s3://"${BUCKET}"/ --acl public-read --follow-symlinks --delete --exclude .env-cmdrc.json
echo "Deployed to S3"

if ! aws s3 sync build/ s3://"${BUCKET}"/ --acl public-read --follow-symlinks --delete --exclude .env-cmdrc.json; then
echo "Deployment to S3 failed"
exit 1
else
echo "Successfully deployed to S3"
fi

0 comments on commit 3c3bf1f

Please sign in to comment.