Skip to content

GitHub Action

Hugo for GitHub Organization Pages

v1.0.3 Latest version
Use latest version

Hugo for GitHub Organization Pages

Publishes and deploys the project to GitHub Organization Pages


Copy and paste the following snippet into your .yml file.

- name: Hugo for GitHub Organization Pages
  uses: StevenACoffman/hugo-deploy-gh-org-pages@v1.0.3
Learn more about this action in StevenACoffman/hugo-deploy-gh-org-pages
Choose a version


Github Action to Automate Hugo extended for a Github Organization Pages

license release GitHub release date StevenACoffman/hugo-deploy-gh-org-pages latest version

GitHub Actions for building Hugo extended and deploying to a Github Organization Pages Submodule Repository

GitHub Action for building and publishing Hugo-built site to a Github Organization Pages. Follow the Hosting on Github Organization Pages step by step instructions.

This action goes in the repository that will contain Hugo’s content and other source files, and expects public to be a submodule pointing to a repo named like

Inspired by khanhicetea/gh-actions-hugo-deploy-gh-pages


  • EMAIL - The email that you would like to have your git push signed as.
  • DEPLOY_KEY_PRIVATE - Required your deploy key which has Write access

Create Deploy Key

  1. Generate deploy key ssh-keygen -t rsa -b 4096 -f hugo -q -N ""
  2. Then go to your repo named <orgname>.github.ioand select "Settings > Deploy Keys" and click the "Add New" button
  3. Add the contents of your public key ( to the Key field and select the "Allow write access" option.
  4. Go to the repo named like that will contain the fully rendered version of your Hugo website
  5. Add the github action as below (the file will go in .github/main.workflow)
  6. Copy your private deploy key to DEPLOY_KEY_PRIVATE secret in "Settings > Secrets"

Environment Variables


Works both with the new yaml workflow format, or the old hcl format, but just use one.


on: push
name: Deploy to GitHub Organization Pages
    name: Filters for GitHub Actions
    runs-on: ubuntu-latest
    - uses: actions/checkout@master
    - name: Filters for GitHub Actions
      uses: actions/bin/filter@master
        args: branch master
    - name: hugo-deploy-gh-org-pages
      uses: StevenACoffman/hugo-deploy-gh-org-pages@v1.0.3
        EMAIL: ${{ secrets.EMAIL }}
        HUGO_VERSION: 0.56.3


workflow "Deploy to GitHub Organization Pages" {
  resolves = ["hugo-deploy-gh-org-pages"]
  on = "push"

action "hugo-deploy-gh-org-pages" {
  uses = "StevenACoffman/hugo-deploy-gh-org-pages@v1.0.3"
  needs = ["Filters for GitHub Actions"]
  secrets = [
  env = {
    HUGO_VERSION = "0.56.3"

action "Filters for GitHub Actions" {
  uses = "actions/bin/filter@master"
  args = "branch master"


MIT License - StevenACoffman/hugo-deploy-gh-org-pages

You can’t perform that action at this time.