Image Credit: Peaceiris
Build Your Hugo Site in GitHub Actions
This action builds your Hugo Site using the latest Hugo Extended.
This action also contains support for several external Hugo Helpers:
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
||The path to build the site into.||
||The version Hugo to use (append
||Latest Hugo Extended|
||Arguments to pass to Hugo||
- 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
This project is partially based on mattbailey/actions-hugo