Publishing a static website involves always two basic steps: Build & Deploy. There are many ways to realize them.

Many workflows for Hugo are listed in the section Hosting & Deployment of its documentation. In all cases we need to set the parameter baseURL to our domain URL in the main configuration file config.yaml.

The following remarks will give you an impression of two common concepts to build & deploy.

Use your own hardware

As long as you are the only one finalizing the content, it’s easy to stick to your own computer. To generate a complete version of the site, we use Hugo’s default build mode in the project root for example like this:

hugo --minify

Hugo renders the site, minifies the HTML and writes the files by default into the folder public. Now, you can upload its content to your provider. That’s it. You may also transfer the files to a big provider with a Content Delivery Network (CDN) for worldwide minimal latency.

Automated Build and Continuous Deployment

Special providers automate the build process with configurable virtual containers. This is especially useful for teams in need of a reliable shared build environment. The provider gets access to the teams repository (usually Git based), automatically pulls new content and (re)builds the site or just a preview. Some of them also own a CDN, which they can populate immediately after every build.

A workflow for a bunch of authors and a few editors could look like this:


This setup may also be convenient for non-commercial projects and in a simplified form for private sites with only one author/editor. Some commercial providers offer a free tier for personal or open-source use. Hugo is building sites so fast, your project may well stay in their often generous limits with several builds per day.

Caching resources

for a build container is essential if we don’t want to waste energy, time and money for unnecessary repeated image processing. Many different versions of every image are generated by this theme. These files are always cached by Hugo in the reserved resources folder so every image needs to be processed only once. But we need to make sure that this caching folder is stored in our repository or enable another caching mechanism between Hugo runs in a container.