Skip to content

Instantly share code, notes, and snippets.

View kevindice's full-sized avatar

Kevin Dice kevindice

View GitHub Profile
@kevindice
kevindice / react-app-s3-sync.sh
Created January 27, 2019 02:19
A shell script for uploading a React app build to S3 + CloudFront for deployment
#!/bin/bash
S3_BUCKET_NAME=$1
CF_ID=$2
# Sync all files except for service-worker and index
echo "Uploading files to $S3_BUCKET_NAME..."
aws s3 sync build s3://$S3_BUCKET_NAME/ \
--acl public-read \
--exclude service-worker.js \