It’s pretty easy to host a static site on Amazon, all you have to do is copy files to an S3 bucket, update a couple of properties on the bucket, and voila! You can upload files via the GUI, but it’s relatively time consuming and definitely repetitive. Naturally there is an easier way.
I wrote the following script to deploy my site in one step. It manages the environments, jekyll build, and copying of files in one step. It even removes the extensions from my blog posts so that I have cleaner URL paths.
All you have to do is
chmod +x deploy.sh and then you can deploy your site with
I have a love/hate relationship with bash, but in this case it was the right tool for the job - grouping a bunch of CLI operations into a single command.