Skip to content

Instantly share code, notes, and snippets.

@mikeblum
Created July 4, 2017 01:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikeblum/763115399d9a0b1ec4f1343aba00ce35 to your computer and use it in GitHub Desktop.
Save mikeblum/763115399d9a0b1ec4f1343aba00ce35 to your computer and use it in GitHub Desktop.
Deploying a Hugo blog to S3
#!/bin/bash
export S3_BUCKET=
# clean public build dir
rm -rf public
# rebuild site
hugo
# destructively sync with S3 bucket
# (anything not mirrored on the local filesystem will be deleted)
aws s3 sync public/ s3://$S3_BUCKET/ --delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment