GitHub Action for Hugo, the world's fastest framework for building websites.
name: hugo
on:
pull_request:
push:
jobs:
hugo:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run Hugo
uses: crazy-max/ghaction-hugo@v1
with:
version: latest
extended: false
args: --cleanDestinationDir --minify --verbose
- name: Deploy to GitHub Pages
if: success() && github.event_name != 'pull_request'
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: public
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Following inputs can be used as step.with
keys
Name | Type | Default | Description |
---|---|---|---|
version |
String | latest |
Hugo version. Example: v0.58.3 |
extended |
Bool | false |
Use Hugo extended |
args |
String | Arguments to pass to Hugo |
Since Dependabot
has native GitHub Actions support,
to enable it on your GitHub repo all you need to do is add the .github/dependabot.yml
file:
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'daily'
Thanks again for your support, it is much appreciated! 🙏
MIT. See LICENSE
for more details.