Git Product home page Git Product logo

hugo-actions's Introduction

Image Credit: Peaceiris

Image Credit: Peaceiris

Build Your Hugo Site in GitHub Actions

πŸš€ 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 βœ”οΈ
Babel βœ”οΈ

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

hugo-actions's People

Contributors

chabad360 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.