Created
December 15, 2019 20:56
-
-
Save stephenharris/6642fd2ccf3c74272bf449f81230b9a7 to your computer and use it in GitHub Desktop.
Deploying an react app to s3 bucket / cloudfront.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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