Hugo Deploy Gh Pages screenshot

Hugo Deploy Gh Pages

Author Avatar Theme by Benmatselby
Updated: 28 Dec 2025
56 Stars

A GitHub Action to build and deploy a Hugo site to GitHub Pages

Overview

Hugo Deploy to GitHub Pages is an efficient tool designed for developers looking to seamlessly publish their Hugo websites directly to GitHub Pages. This feature-rich GitHub action operates within a Docker container, providing a reliable environment for building and deploying your site without the typical hassles associated with traditional deployment methods.

With a strong focus on ease of use and flexibility, this action empowers users to customize various aspects of their deployment process, making it a practical choice for Hugo enthusiasts and GitHub users alike.

Features

  • Docker Container: Operates within a Docker environment, ensuring a consistent build for your Hugo site without local configurations.

  • Access Token Support: Requires a GitHub access token for pushing changes, allowing for secure and automated deployment to your GitHub Pages repository.

  • Customizable Environment Variables: Users can set multiple variables like CNAME, GO_VERSION, and HUGO_VERSION to fine-tune their deployment settings to meet their specific needs.

  • Extended Hugo Support: Option to enable the extended version of Hugo for those who require additional features and functionalities in their builds.

  • Target Branch Specification: Easily configure the branch where the built files are pushed, providing greater control over your repository.

  • Local Testing: A straightforward method for testing the action locally by building the Docker image and running standard or extended versions of Hugo.

  • Commit Messages: Automatically commits changes to your repository with the current date as the commit message, streamlining the update process.

  • In-Depth Tutorial: Available online, this tutorial aids users in effectively utilizing the action, particularly for those using the Hugo Academic theme, making the process accessible for a wider audience.