Skip to content

Github action for building a Zola site and deploying to Github Pages

Notifications You must be signed in to change notification settings

te-online/zola-deploy-action

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Zola Deploy Action

A GitHub action to automatically build and deploy your zola site to the master branch as GitHub Pages.

Table of Contents

Usage

workflow "Build and deploy on push" {
  on = "push"
  resolves = ["zola deploy"]
}

action "zola deploy" {
  uses = "shalzz/zola-deploy-action@master"
  secrets = ["TOKEN"]
  env = {
    PAGES_BRANCH = "master"
  }
}

Secrets

  • TOKEN: Personal Access key with the scope public_repo, we need this to push the site files back to the repo.

    ( Actions already provides a GITHUB_TOKEN which is an installation token and does not trigger a GitHub Pages builds hence we need a personal access token )

Environment Variables

  • PAGES_BRANCH: The git branch of your repo to which the built static files will be pushed. Default is master branch

Custom Domain

If you're using a custom domain for your GitHub Pages site put the CNAME in static/CNAME so that zola puts it in the root of the public folder which is where GitHub expects it to be.

About

Github action for building a Zola site and deploying to Github Pages

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 58.9%
  • Dockerfile 33.1%
  • HCL 8.0%