Skip to content

Commit

Permalink
Merge pull request #108 from cami-espinozaq/deployment-trial-serverless
Browse files Browse the repository at this point in the history
updated deploy script
  • Loading branch information
cami-espinozaq authored Oct 19, 2023
2 parents 118cb5b + 97b786f commit 4ff7350
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/deploy-frontend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# todo: make dynamic via serverless
BUCKET="hackingstudio-code4maus-app"

if [ "$TRAVIS_BRANCH" == "production" ]; then
if [ "$BRANCH" == "production" ]; then
BUCKET="${BUCKET}-prod"
elif [ "$TRAVIS_BRANCH" == "develop" ]; then
elif [ "$BRANCH" == "develop" ]; then
BUCKET="${BUCKET}-staging"
else
BUCKET="${BUCKET}-dev"
Expand All @@ -15,4 +15,6 @@ aws s3 sync build s3://${BUCKET} --delete --acl public-read
for FILE in $(find build -name index.html -printf '%P\n'); do
aws s3 cp build/${FILE} s3://${BUCKET}/${FILE} --metadata-directive REPLACE --cache-control max-age=0,no-cache,no-store,must-revalidate --content-type text/html --acl public-read
done
aws s3 cp build/service-worker.js s3://${BUCKET}/service-worker.js --metadata-directive REPLACE --cache-control max-age=0,no-cache,no-store,must-revalidate --content-type application/javascript --acl public-read
if "$BRANCH" == "production"; then
aws s3 cp build/service-worker.js s3://${BUCKET}/service-worker.js --metadata-directive REPLACE --cache-control max-age=0,no-cache,no-store,must-revalidate --content-type application/javascript --acl public-read
fi

0 comments on commit 4ff7350

Please sign in to comment.