Gh Actions Hugo Deploy Gh Pages screenshot

Gh Actions Hugo Deploy Gh Pages

Author Avatar Theme by Khanhicetea
Updated: 13 Dec 2019
42 Stars

Github Actions : Hugo static site generator

Overview

The Hugo GitHub Action is a powerful tool designed for automating the building and publishing of websites created using Hugo. By seamlessly integrating with GitHub, this action simplifies the deployment process for developers, allowing them to focus on creating content rather than managing deployment intricacies. Whether you’re a solo developer or part of a larger team, this action provides a straightforward approach to keep your site updated with the latest changes.

This action is inspired by previous solutions like BryanSchuetz/jekyll-deploy-gh-pages, but it offers unique features tailored specifically for Hugo users. With easy setup and effective environment configurations, it streamlines the process of pushing changes to your website’s repository, ultimately saving time and improving efficiency.

Features

  • GIT_DEPLOY_KEY: A required deploy key that must have write access to facilitate the deployment process securely.
  • Customizable Hugo Version: Set your preferred Hugo version using the optional environment variable HUGO_VERSION, defaulting to 0.54.0.
  • Branch Management: Specify the branch for deployment with GITHUB_BRANCH, defaulting to gh-pages, allowing for flexible site management.
  • Remote Repository Support: Easily deploy to a remote branch by adjusting the settings in GITHUB_REMOTE_REPOSITORY, ensuring that your site can be hosted wherever you choose.
  • CNAME Management: Simplify custom domain setup by placing the CNAME file within the static folder, ensuring proper domain resolution.
  • RPC Ping Support: The action includes a built-in RPC ping feature to notify search engines of updates, enhancing your site’s visibility.
  • Backward Compatibility: Maintains support for the older syntax (main.workflow), ensuring that existing users can transition smoothly without disrupting their workflows.