Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 1.28 KB

Readme.md

File metadata and controls

36 lines (27 loc) · 1.28 KB

Hugo Deploy Action

This is a simple GitHub Action to facilitate publishing static sites built with Hugo to an organization site. Which is to say:

  1. You have a site Hugo project in foo/site-src repository.
  2. You have a GitHub organization site repository like foo/foo.github.io.
  3. You want to automated the build and publish process.

Usage

Add a .github/workflows/main.yml file with content like the following:

steps:
  - uses: actions/checkout@master
    with:
      submodules: true

  - uses: jsumners/gh-action-hugo-deploy@v1.0.0
    with:
      destination_repo: foo/foo.github.io
      destination_token: ${{ secrets.Deploy_Token }}

Add a secret to your site-src repository named Deploy_Token. The value of this secret should be a GitHub access token with the "repo" permissions. This token must have permission to publish to your .github.io repository.

That's it. See the action.yml file for more information on the available configuration options.