Go to file
Simon Taranto 7e2bc24fde
Merge pull request #1 from dimo414/patch-1
Invoke hugo directly, rather than via sh
2020-03-11 10:28:57 -06:00
Dockerfile Update description 2019-02-04 13:05:33 -07:00
entrypoint.sh Invoke hugo directly, rather than via sh 2020-01-18 11:29:51 -08:00
LICENSE Create LICENSE 2019-02-04 09:11:44 -07:00
README.md Add example of fetching themes. 2019-02-01 16:47:40 -07:00

GitHub Action for Hugo

An Action to run hugo commands.

This example runs on pushes to the master branch and will run hugo --theme=hyde-x to build your site.

workflow "Hugo build" {
  resolves = [
    "Hugo Action",
  ]
  on = "push"
}

action "Hugo Action" {
  uses = "srt32/hugo-action@master"
  needs = "Filters for GitHub Actions"
  args = "--theme=hyde-x"
}

action "Filters for GitHub Actions" {
  uses = "actions/bin/filter@b2bea0749eed6beb495a8fa194c071847af60ea1"
  args = "branch master"
}

Want to dynamically fetch themes before building? Use this action like this

workflow "Hugo build" {
  resolves = [
    "Hugo Action",
  ]
  on = "push"
}

action "Fetch git submodules" {
  uses = "srt32/git-actions@master"
  args = "cd themes && git clone https://github.com/zyro/hyde-x"
}

action "Hugo Action" {
  uses = "srt32/hugo-action@master"
  needs = ["Filters for GitHub Actions", "Fetch git submodules"]
  args = "--theme=hyde-x"
}

action "Filters for GitHub Actions" {
  uses = "actions/bin/filter@b2bea0749eed6beb495a8fa194c071847af60ea1"
  args = "branch master"
}