Skip to content

Instantly share code, notes, and snippets.

@sbogacz
Last active August 9, 2016 04:37
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 sbogacz/577b0ffa43091f355a2c0cd1c58ded71 to your computer and use it in GitHub Desktop.
Save sbogacz/577b0ffa43091f355a2c0cd1c58ded71 to your computer and use it in GitHub Desktop.
Hugo automation makefile
all: build sync-s3 invalidate-cache
clean:
@rm -rf \
public
build:
hugo -v
sync-s3:
aws s3 sync --acl "public-read" --sse "AES256" public/ "s3://$(S3_BUCKET)" --exclude 'post'
invalidate-cache:
aws configure set preview.cloudfront true
aws cloudfront create-invalidation --distribution-id $(CF_DISTRIBUTION) --paths /index.html / "/page/*"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment