Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/klakegg/actions-hugo
Powerful Hugo action for simple and advanced use cases.
https://github.com/klakegg/actions-hugo
actions hugo
Last synced: about 1 month ago
JSON representation
Powerful Hugo action for simple and advanced use cases.
- Host: GitHub
- URL: https://github.com/klakegg/actions-hugo
- Owner: klakegg
- License: mit
- Created: 2019-08-21T04:12:33.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-08-18T19:14:51.000Z (over 2 years ago)
- Last Synced: 2024-11-16T12:34:21.318Z (about 1 month ago)
- Topics: actions, hugo
- Language: JavaScript
- Homepage:
- Size: 10.7 KB
- Stars: 14
- Watchers: 2
- Forks: 6
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hugo Action
Easy to use action to build your Hugo homepage using the [klakegg/hugo Docker images](https://hub.docker.com/r/klakegg/hugo) made available.
## Getting started
Your workflow is written in e.g. `.github/workflows/hugo.yml`.
Simple workflow example using the latest and lightest image:
```yaml
name: Hugoon: [push]
jobs:
build:
runs-on: ubuntu-lateststeps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0- name: hugo
uses: klakegg/[email protected]
```More advanced workflow example using matrix with multiple versions and image types:
```yaml
name: Hugoon: [push]
jobs:
build:
strategy:
matrix:
version: [0.56.3, 0.57.2]
image: [busybox, alpine]runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0- name: hugo
uses: klakegg/[email protected]
with:
version: ${{ matrix.version }}
image: ${{ matrix.image }}
```## Configuration
**version** - Sets the version of Hugo to be used during build. Defaults to *blank* when not set, resulting in using the very latest version.
**image** - Sets the image type used. Defaults to `busybox` when not set. The following are available for most versions (`ext` indicate [extended edition](https://github.com/klakegg/docker-hugo/blob/master/README.md#hugo-extended-edition)):
* busybox
* alpine
* debian
* ubuntu
* ext-alpine
* ext-debian
* ext-ubuntu**source** - Sets the source directory to be used. Defaults to *blank*, expecting Hugo config file to be at the root of your repository.
**target** - Sets the target directory to be used. Defaults to `public`.
**command** - Sets the command to be used. Defaults to *blank*. When set is normal Hugo commands used, however `hugo` is skipped.
**pandoc_command** - Sets the Pandoc command used. Defaults to `pandoc-default`. See use of [Pandoc with Hugo](https://github.com/klakegg/docker-hugo#using-pandoc) for more information.
**env** - Sets the Hugo environemt. Defaults to `DEV`. Possible values:
* DEV
* production