index.md (1147B)
1 --- 2 title: "2024, Day 6: More fun with Git website stuff" 3 description: "Planning to change how I publish my site" 4 date: 2024-12-06T21:37:43-08:00 5 draft: false 6 --- 7 8 I [previously mentioned]({{< relref "december-adventure/2024-02" >}}) that 9 I use `git push` to publish my site, but it's pretty hacky; I basically have 10 a makeshift "publish my site" script shoehorned into a hook somewhere. I aim 11 to change that. 12 13 [My webhost](https://nearlyfreespeech.net/) already has Hugo installed; the 14 version's only a bit older than the one I have locally, so that shouldn't 15 cause too many headaches. I bet I can streamline my setup and push to 16 a remote that lives there, and use a `post-receive` hook to rebuild the site 17 in place. I didn't set things up this way initially because I didn't know 18 about Git's "[push to 19 deploy](https://github.blog/open-source/git/git-2-3-has-been-released/#push-to-deploy)" 20 capability, which is enabled by setting Git's configuration option 21 `receive.denyCurrentBranch` to `updateInstead` on the "server" repository. 22 23 I need to do more testing, but my next update should hopefully have a brief 24 writeup on how to set everything up.