Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/chabad360/hugo-actions

πŸš€ Use Hugo with GitHub Actions πŸš€
https://github.com/chabad360/hugo-actions

actions hugo workflow

Last synced: 14 days ago
JSON representation

πŸš€ Use Hugo with GitHub Actions πŸš€

Awesome Lists containing this project

README

        


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 | βœ”οΈ |
| Babel | βœ”οΈ |
| Hugo Modules | βœ”οΈ |

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

## ⭐ Getting started

This is a basic `workflow.yml` to get you started (for more information scroll down to [⭐ Inputs](#-inputs)):

```yaml
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

```yaml
- 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](https://github.com/mattbailey/actions-hugo)