Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/srt32/hugo-action
Commands to help with building Hugo based static sites
https://github.com/srt32/hugo-action
action github-action github-actions hugo static-site
Last synced: 3 months ago
JSON representation
Commands to help with building Hugo based static sites
- Host: GitHub
- URL: https://github.com/srt32/hugo-action
- Owner: srt32
- License: mit
- Created: 2019-02-01T22:22:45.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-11T16:28:58.000Z (almost 5 years ago)
- Last Synced: 2024-04-14T19:58:55.807Z (10 months ago)
- Topics: action, github-action, github-actions, hugo, static-site
- Language: Dockerfile
- Homepage:
- Size: 6.84 KB
- Stars: 64
- Watchers: 5
- Forks: 16
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GitHub Action for Hugo
An Action to run [`hugo`](https://gohugo.io/) 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](https://github.com/marketplace/actions/git-actions) 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"
}
```