Static site S3 workflow
After a snafu with my previous hosting company, I’ve been using Amazon’s static site service on S3.
Site is built in build/
. I’ve been using Grunt mostly, but this would work just as well for Jekyll sites.
I use s3cmd to transfer the files. Everything in build/
gets uploaded.
s3cmd sync build/. s3://masonry.desandro.com
This command is saved in a Makefile. See masonry-docs/Makefile.
make deploy
So after set up, making a site takes one or two commands
grunt
make deploy
See this workflow in use:
This workflow is especially straightforward. At one time I did try a git post-receive hook (like one Nicolas Gallagher explains), but this felt murky, _ssh_ing to a remote box, managing two git instances. Sticking with straight-up file transfering is dumb enough that I can understanding it. Adding a separate workflow for deployment on top of git seems like duplicated effort, but there’s a benefit to separating these tasks. In my head, they’re separate.