I recently wrote about migrating my website to GitHub Pages and noted that I wasn’t completely satisfied with my deployment workflow. Ideally, creating a build should be done in a single step. As I wrote, my previous build workflow required me to manually compile my LESS files before committing if I’d made changes. While my stylesheet doesn’t change often, this method is certainly not ideal.
Using Git hooks, it’s possible to run a script at certain points during the Git workflow. To take advantage of this in my case, I added a small bash script to
This is a pretty rough script, but it gets the job done for me. For a much more thorough script, see this article by TJ VanToll.