Skip to content

Instantly share code, notes, and snippets.

@stephenharris
Created December 15, 2019 20:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stephenharris/6642fd2ccf3c74272bf449f81230b9a7 to your computer and use it in GitHub Desktop.
Save stephenharris/6642fd2ccf3c74272bf449f81230b9a7 to your computer and use it in GitHub Desktop.
Deploying an react app to s3 bucket / cloudfront.
version: 2
jobs:
build:
docker:
- image: circleci/node:10
steps:
- checkout
- run: npm install
- run: sudo apt-get update && sudo apt-get install -y python-dev
- run: sudo curl -O https://bootstrap.pypa.io/get-pip.py
- run: sudo python get-pip.py
- run: sudo pip install awscli --upgrade
- run: aws --version
- run: aws s3 ls
- run: npm run deploy
# npm run deploy:
# react-scripts build && aws s3 sync build/ s3://S3BUCKET_URL --delete && aws cloudfront create-invalidation --distribution-id=DISTRIBUTION_ID --paths=/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment