crazy-max / ghaction-hugo

GitHub Action for Hugo, the world's fastest framework for building websites

Home Page:https://github.com/marketplace/actions/hugo-github-action

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GitHub release GitHub marketplace Test workflow Codecov Become a sponsor Paypal Donate

About

GitHub Action for Hugo, the world's fastest framework for building websites.

Hugo GitHub Action


Usage

name: hugo

on:
  push:
  pull_request:

jobs:
  hugo:
    runs-on: ubuntu-latest
    steps:
      -
        name: Checkout
        uses: actions/checkout@v4
      -
        name: Run Hugo
        uses: crazy-max/ghaction-hugo@v3
        with:
          version: latest
          extended: false
          args: --cleanDestinationDir --minify --verbose
      -
        name: Deploy to GitHub Pages
        if: github.event_name != 'pull_request'
        uses: crazy-max/ghaction-github-pages@v4
        with:
          target_branch: gh-pages
          build_dir: public
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Customizing

inputs

The 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

Contributing

Want to contribute? Awesome! The most basic way to show your support is to star the project, or to raise issues. You can also support this project by becoming a sponsor on GitHub or by making a PayPal donation to ensure this journey continues indefinitely!

Thanks again for your support, it is much appreciated! 🙏

License

MIT. See LICENSE for more details.

About

GitHub Action for Hugo, the world's fastest framework for building websites

https://github.com/marketplace/actions/hugo-github-action

License:MIT License


Languages

Language:TypeScript 62.0%Language:Dockerfile 27.3%Language:HCL 10.7%