Skip to content
cloud-drizzle

GitHub Action

Deploy Hugo Site

v1.0.0 Latest version

Deploy Hugo Site

cloud-drizzle

Deploy Hugo Site

Deploy a Hugo based site to a .github.io repository

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Deploy Hugo Site

uses: jsumners/gh-action-hugo-deploy@v1.0.0

Learn more about this action in jsumners/gh-action-hugo-deploy

Choose a version

Hugo Deploy Action

This is a simple GitHub Action to facilitate publishing static sites built with Hugo to an organization site. Which is to say:

  1. You have a site Hugo project in foo/site-src repository.
  2. You have a GitHub organization site repository like foo/foo.github.io.
  3. You want to automated the build and publish process.

Usage

Add a .github/workflows/main.yml file with content like the following:

steps:
  - uses: actions/checkout@master
    with:
      submodules: true

  - uses: jsumners/gh-action-hugo-deploy@v1.0.0
    with:
      destination_repo: foo/foo.github.io
      destination_token: ${{ secrets.Deploy_Token }}

Add a secret to your site-src repository named Deploy_Token. The value of this secret should be a GitHub access token with the "repo" permissions. This token must have permission to publish to your .github.io repository.

That's it. See the action.yml file for more information on the available configuration options.