Hacker News new | past | comments | ask | show | jobs | submit login

It's somewhat convoluted and custom to my specific hosting setup (I use https://www.nearlyfreespeech.net because I want an Apache server so I can use complex redirects). Essentially, the GitHub Action builds the site and then copies it over to NFSN. This is all done in a Docker container.

The only potentially interesting part about this setup is I take advantage of this git feature I didn't know about until I set this up: https://git-scm.com/docs/git-worktree. This lets you essentially check out a branch into a folder in a repo. Hugo can then build the site in to the special folder, and the built site is committed just to that branch. I then push this branch to NFSN, rather than using rsync or scp, which takes a lot longer for small changes compared with sending a git delta over the wire.

I plan to write up a more extensive description of this when GitHub Actions come out of beta. If you want to hear about it when it comes out, you can subscribe to my blog's newsletter: https://masnick.blog/subscribe/

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact