Deploying to Github Pages

A quick summary of deploying this Hugo generated site to Github pages (and hence via the instructions from the Hugo docs.

To summarise:

  1. Create source (arbitrary name) and deployed (name must be <username> for Github pages) repos on Github.

  2. Clone the source project. Note the baseURL in the config should point to the Github URL even when making the site available via a different URL.

  3. Add content.

  4. Add the built (by default, ./public) folder as a submodule, pointing to <username>

    git submodule add -b master<USERNAME>/<USERNAME> public
  5. Add and run the script.

  6. Finally, tweak the deployed repository settings as per the Github instructions.

See also