Automating Tailwind Builds with Kamal Post-Deploy Hooks

Recently, I have been working on a Sinatra-based web app. Some backend pages were designed using Tailwind CSS, which meant I needed to compile Tailwind assets after every change. I was deploying the API using Kamal, and every time I deployed, I had to run the Tailwind build command manually: bundle exec rake tailwind:build This quickly became tedious, especially when deploying frequently during development. Automating with Post-Deploy Hooks I wanted to automate this process so that Tailwind assets are built automatically after every deployment. After digging a bit, I discovered post-deploy hooks in Kamal. ...

January 5, 2026 · 2 min · Mausam Pun