Created
August 29, 2017 19:09
-
-
Save nateluzod/4d5c6d81ba759e12acbc80d216b99d8c to your computer and use it in GitHub Desktop.
Travis config for deploying Hugo app to S3 bucket
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
# 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