Posts in: post

Git hook for static sites hosted on S3

It’s a surprisingly simple process to setup S3 syncing with a static site generator with source that you sync using Git. This will allow you to track revision history on your actual writing of posts, etc. while having the generated site automatically deployed on S3 on each push. All you really need is: A way to upload a folder to S3 (I use the excellent s3cmd) A hook that triggers the upload on every git push For example, if your static site generator is hugo, with destination dir public (like Hugo by default) and your S3 bucket is called <example_bucket>, create a new shell script called pre-push in the .

Continue reading →