Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Set up TravisCI to sync an S3 bucket.
" Two env variables must be added to TravisCI settings:
pip install --user awscli
provider: script
script: ~/.local/bin/aws s3 sync dist s3://MY_BUCKET_NAME --region=us-west-2 --delete
skip_cleanup: true
Copy link

astrotim commented May 18, 2017

Thanks for the gist. I'm using this with the --cache-control option.

script: ~/.local/bin/aws s3 sync dist s3://MY_BUCKET_NAME --region=us-west-2 --delete --cache-control="max-age=31536000"

I'm trying to find docs on how to set the cache-control only for specific file types, such as everything except .html files. Do you know how to achieve this?

Copy link

caub commented Jun 27, 2017

@astrotim put the files in 2 different folders, then sync each folder with different options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment