Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/lowply/build-hugo

A GitHub Action to build Hugo site.
https://github.com/lowply/build-hugo

github-actions hugo

Last synced: 4 days ago
JSON representation

A GitHub Action to build Hugo site.

Awesome Lists containing this project

README

        

# Build Hugo

A GitHub Action for building [Hugo](https://gohugo.io/) sites.

- Utilizes [Hugo extended version 0.140.0](https://github.com/gohugoio/hugo/releases/tag/v0.140.0)
- Based on [debian:buster-slim](https://hub.docker.com/_/debian/)

## Usage

### Example Workflow

```yaml
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/[email protected]
```

### Versioning

The Build Hugo version aligns with [Hugo's releases](https://github.com/gohugoio/hugo/releases). If you need a specific Hugo version to build your website, you can specify it like this:

```yaml
- name: Build Hugo
uses: lowply/[email protected]
```

### Running Locally

To run it locally, use the following command:

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

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