Skip to content

Instantly share code, notes, and snippets.

@nobodyplace
Created June 26, 2019 06:53
Show Gist options
  • Select an option

  • Save nobodyplace/3adeab45dd86af9f48efb0822fc344d7 to your computer and use it in GitHub Desktop.

Select an option

Save nobodyplace/3adeab45dd86af9f48efb0822fc344d7 to your computer and use it in GitHub Desktop.
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