Skip to content
box

GitHub Action

Hugo-Site

1.0.0 Latest version
Use latest version
box

Hugo-Site

GitHub Action for Building a Hugo Site

Installation

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

- name: Hugo-Site
  uses: chabad360/hugo-actions@1.0.0
Learn more about this action in chabad360/hugo-actions
Choose a version
Image Credit: Peaceiris

Image Credit: Peaceiris

Build Your Hugo Site in GitHub Actions

gohugoio/hugo: The world’s fastest framework for building websites

🚀 License Release Release 🚀

 

This action builds your Hugo Site using the latest Hugo Extended.

This action also contains support for several external Hugo Helpers:

Name Support
reStructuredText ✔️
Pandoc ✔️
Asciidoctor ✔️
PostCSS ✔️
Pygments ✔️

If your site requires the use of another external helper, submit an issue and I'll try to add it.

⚠️ Note: To use this action, you must have applied to the GitHub Actions public beta. You can apply here.

⭐ Getting started

This is a basic workflow.yml to get you started (for more information scroll down to ⭐ Inputs):

name: Build Site

on:
  push:
    branches:
      - master

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout Repo
        uses: actions/checkout@master
        with:
          submodules: true
      - name: Build Site
        uses: chabad360/hugo-actions@master

⭐ Inputs

Key Description Required Default
buildPath The path to build the site into. public
hugoVersion The version Hugo to use (append extended_ to the begining to use the extended version). Latest Hugo Extended
args Arguments to pass to Hugo --gc --minify --cleanDestinationDir

Usage

- name: Publish Site
  uses: chabad360/hugo-actions@master
  with:
    buildPath: 'public'
    # Use if you have a need to build the site to another directory
    hugoVersion: 'extended_0.58.3'
    # Use if your site requires a specific version of Hugo
    # Append "extended_" to the begining to use Hugo Extended
    args: --gc --minify --cleanDestinationDir
    # Use if you want to pass some custom arguments to Hugo

⭐ Credit

This project is partially based on mattbailey/actions-hugo

You can’t perform that action at this time.