Skip to content

Instantly share code, notes, and snippets.

@nateluzod
Created August 29, 2017 19:09
Show Gist options
  • Save nateluzod/4d5c6d81ba759e12acbc80d216b99d8c to your computer and use it in GitHub Desktop.
Save nateluzod/4d5c6d81ba759e12acbc80d216b99d8c to your computer and use it in GitHub Desktop.
Travis config for deploying Hugo app to S3 bucket
# Auto deploy repo from Github to Amazon S3 bucket via Travis CI
# * Set env vars for ACCESS_KEY_ID and SECRET_ACCESS_KEY on Travis
# * Update `bucket.name` in `sync` command
# * Assumes your `publishDir` is the default (`public`) - if not update `sync` command
language: go
install: go get -v github.com/spf13/hugo
script:
- hugo
- python --version
- sudo pip install s3cmd
- s3cmd sync --delete-removed --access_key=$ACCESS_KEY_ID --secret_key=$SECRET_ACCESS_KEY -P -M -r public/ s3://bucket.name
notifications:
email:
on_failure: always
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment