CD? J/k
Using GitHub action to run deployment was way overkill:
- Its kinda slow. Spinning up a VM, doing build, and then rsync took about 30 seconds.
- I think that I could get by with GitHub’s generous 2,000 minutes a month of action run time even if I post a lot. However, I’d rather not have to scramble if GitHub changes their mind, or I decide to do something fancier on my site that ends up eating up more build time.
So, I’m doing what I should have done which was to trigger my already existing deploy script from a git hook. That’ll get the job done.
Tried the hook on the command line and sure enough you see the cute emoji from the deploy script before code is shipped out the door. I did another push from lazygit and you can see the same in the command log pane. Nice!
One minor gotcha that Claude warned me about is that git hooks are not a part
of the repo they live in; so, if you want the hook in different project copies
you need to do a little work yourself. I added my pre-push hook to site docs
with notes how to setup up when setting up a new project copy.