This is my .travis.yml:
deploy:
  provider: s3
  access_key_id: $AWS_ACCESS_KEY
  secret_access_key: $AWS_SECRET_KEY
  bucket: domain.com
  skip_cleanup: true
  acl: public_read
  region: ap-northeast-1
  endpoint: domain.com.s3-website-ap-northeast-1.amazonaws.com
  detect_encoding: true
  on:
    branch: master
But it is only upload files to bucket, not sync. How can I sync or clear S3 bucket files?
                        
Thanks Guys, The scripts above helped me to build the following that worked for me
before_script: - pip install awscli - export PATH=$PATH:$HOME/.local/bin - AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY aws s3 rm s3://$BUCKET --recursive --region=$REGION