Skip to content

Commands to help with building Hugo based static sites

License

Notifications You must be signed in to change notification settings

srt32/hugo-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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"
}