Skip to content

Build Hugo

Actions
Run the hugo command to build a website
v0.149.1
Latest
Star (35)

Build Hugo

A GitHub Action for building Hugo sites.

Usage

Example Workflow

name: Build Hugo
on: [push]
jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    steps:
    - name: Check out code
      uses: actions/checkout@v2
    - name: Build Hugo
      uses: lowply/build-hugo@v0.149.1

Versioning

The Build Hugo version aligns with Hugo's releases. If you need a specific Hugo version to build your website, you can specify it like this:

    - name: Build Hugo
      uses: lowply/build-hugo@v0.68.3

Warning

As of recently the mirrors for debian:buster-slim are broken. Therefore this action will not work for the versions that reference that base image. A current workaround is to use 0.148.1 or later which uses the debian:bookworm-slim base image.

Running Locally

To run it locally, use the following command:

docker run --rm -w /tmp -v $(pwd):/tmp lowply/build-hugo:v0.149.1

Development

Keeping Up with the Latest Hugo Version

To create a PR for the latest version, run:

./script/update.sh

After reviewing and ensuring the PR passes all tests, merge it, and then execute:

./script/release.sh

Build Hugo is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Run the hugo command to build a website
v0.149.1
Latest

Build Hugo is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.