Quick introduction

This is a step by step tutorial how to deploy a Hugo website to {user}.github.io

These are the steps I followed:

  1. follow the quickstart guide and add the template you find the best for your interest. I use hello-friend-ng.
  2. init your local github repository
  3. create a new repository on github with name like: {user}.github.io and push your local repo
  4. go to the repository settings on github and setup the build: github pages settings(this means every push to master will trigger a build using the docs folder as source)
  5. set the publishDir variable to docs in hugo.toml (running hugo command will put all the generated files into this dir because the setting above expects /docs as the publish dir)
  6. run
    foo@bar:~$ hugo
    
  7. commit and push the changes, this will trigger the pages-build-deployment workflow
  8. visit {user}.github.io when the workflow run is completed

Enjoy your site!