Created
June 26, 2019 06:53
-
-
Save nobodyplace/3adeab45dd86af9f48efb0822fc344d7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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.1 | |
| orbs: | |
| aws-cli: circleci/aws-cli@0.1.13 | |
| jobs: | |
| build: | |
| working_directory: ~/repo | |
| environment: | |
| - AWS_S3_BUCKET_NAME: your-s3-bucket-name | |
| docker: | |
| - image: innovatorjapan/awscli:latest | |
| steps: | |
| - checkout | |
| - run: | |
| name: Deploy to S3 if branch is Master. | |
| command: | | |
| if [ "${CIRCLE_BRANCH}" == "master" ]; then | |
| aws s3 sync ~/repo s3://${AWS_S3_BUCKET_NAME}/ --delete --storage-class REDUCED_REDUNDANCY | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment