Home
NOTE: I'm in the middle of upgrading the site. Most things are in place, but some things are missing and/or broken. This includes alt text for images. Please bear with me while I get things fixed.

Hugo to AWS S3 Deploy Command

TODO: Figure out why this isn't working in MDX


Here's a quick snippet of code to put your shell aliases file that cds into your Hugo directory, builds the site, deploys it to AWS S3, and then invalidates the cache. 


	function hugo-deploy () {
	    cd /path/to/hugo/site
	    hugo
	    aws s3 sync /path/to/hugo/site s3://your_site_s3_bucket/
	    aws cloudfront create-invalidation --distribution-id AAAAWWWWWSSSS1111 --paths "/*"
	}
~ fin ~