See https://gohugo.io/tutorials/github-pages-blog/ and (the more important) https://www.sheki.in/post/autodeploy-hugo/.