Moving Hosts From GitHub Pages to Amazon S3
I’ve decided to simplify the deployment process and host the blog at S3 instead.
Now, my deployment script looks like this:
#!/bin/sh
killall hugo # make sure no hugo server is running since that can mess things up
hugo
s3cmd sync public/* s3://life.beyondrails.com -v --no-mime-magic
That --no-mime-magic switch is because of a known issue that causes CSS and JS files to be uploaded with a MIME type of text/plain instead of text/css and text/js, respectively.
Aside from a more streamlined deployment process, I’m also able to completely sidestep an intermittent DNS error that sometimes happened when loading the blog while it was hosted on GitHub Pages.