Giter VIP home page Giter VIP logo

hugo-build-action's Introduction

GitHub Action for Hugo ✏️

Build docs

This is a simple GitHub Action that contains Hugo, the popular static site generator. The extended version is now bundled by default. Unlike other actions, this action includes releases going back to v0.27 (September 2017) for any compatibility requirements.

Usage

workflow.yml Example

This example simply uploads the ./public directory (the built Hugo website) as an artifact. You can replace the last actions/upload-artifact step with another action, like James Ives' GitHub Pages deploy action or my S3 sync action, to upload the built static site somewhere accessible.

Replace the master in uses: jakejarvis/hugo-build-action@master to specify the Hugo version, back to v0.27, like [email protected]. This might be necessary if a recent version broke compatibility with your site. Otherwise, you'll get the latest version.

The with: args: portion holds any optional flags. You can remove those two lines for a vanilla build.

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - uses: jakejarvis/hugo-build-action@master  # ...or replace 'master' with a full version tag, such as: v0.64.1
      with:
        args: --minify --buildDrafts
    - uses: actions/upload-artifact@master
      with:
        name: website
        path: './public'

Included Software

Just in case, the final container includes a few small third-party tools that are required by certain optional Hugo features:

Node (with NPM and Yarn) and Go (for Hugo Modules support) are also pre-installed.

Licenses

This action is distributed under the MIT License. Hugo is distributed under the Apache License 2.0.

hugo-build-action's People

Contributors

jakejarvis avatar stephengilboy avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.