Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jsumners/gh-action-hugo-deploy

An action to deploy Hugo based sites to GitHub organization repos
https://github.com/jsumners/gh-action-hugo-deploy

actions deployment github-actions publishing

Last synced: 19 days ago
JSON representation

An action to deploy Hugo based sites to GitHub organization repos

Awesome Lists containing this project

README

        

# Hugo Deploy Action

This is a simple [GitHub Action](https://github.com/actions) to facilitate
publishing static sites built with [Hugo](https://gohugo.io) to an organization
site. Which is to say:

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

## Usage

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

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

- uses: jsumners/[email protected]
with:
destination_repo: foo/foo.github.io
destination_token: ${{ secrets.Deploy_Token }}
```

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

That's it. See the [`action.yml`](/action.yml) file for more information
on the available configuration options.

[secret]: https://help.github.com/en/articles/virtual-environments-for-github-actions#creating-and-using-secrets-encrypted-variables
[token]: https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line