This is a simple GitHub Action to facilitate publishing static sites built with Hugo to an organization site. Which is to say:
- You have a site Hugo project in
foo/site-src
repository. - You have a GitHub organization site repository like
foo/foo.github.io
. - You want to automated the build and publish process.
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.
Deploy Hugo Site is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.