I don’t enjoy the process of having to build the site and push the built site to a service like github. It adds a certain kind of friction to the process of “saving” my work that just isn’t life-giving for me.
You can find descriptions of such a setup by googling.
I have looked into this before, but it honestly just seemed very esoteric and complex. I'm surprised that Github doesn't provide pre-made "recipes" for this stuff.