Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

DEVPROD-5097: Prevent deploy_to_prod task from failing silently #2274

Merged
merged 1 commit into from
Feb 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading