All Projects → shalzz → zola-deploy-action

shalzz / zola-deploy-action

Licence: MIT license
Github action for building a Zola site and deploying to Github Pages

Programming Languages

HTML
75241 projects
Sass
350 projects
shell
77523 projects
Dockerfile
14818 projects
SCSS
7915 projects

Projects that are alternatives of or similar to zola-deploy-action

chart-testing-action
A GitHub Action to lint and test Helm charts
Stars: ✭ 139 (+6.11%)
Mutual labels:  actions, github-actions
github-action-scp
⬆️ Copy a folder to a remote server using SSH
Stars: ✭ 123 (-6.11%)
Mutual labels:  actions, github-actions
pin-github-action
Pin your GitHub actions to a specific hash
Stars: ✭ 38 (-70.99%)
Mutual labels:  actions, github-actions
algoliasearch-crawler-github-actions
Algolia Crawler Github action
Stars: ✭ 24 (-81.68%)
Mutual labels:  actions, github-actions
code-owner-self-merge
A GitHub Action for letting CODEOWNERS merge PRs via green PR reviews
Stars: ✭ 43 (-67.18%)
Mutual labels:  actions, github-actions
actions
🧰 Collection of github actions for automation
Stars: ✭ 28 (-78.63%)
Mutual labels:  actions, github-actions
jest-github-action
Jest action adding checks with annotations to your pull requests and coverage table as comments
Stars: ✭ 134 (+2.29%)
Mutual labels:  actions, github-actions
danger-action
Execute danger action for GitHub Actions.
Stars: ✭ 24 (-81.68%)
Mutual labels:  actions, github-actions
ghaction-chocolatey
GitHub Action for Chocolatey, the package manager for Windows
Stars: ✭ 58 (-55.73%)
Mutual labels:  actions, github-actions
setup-just
🤖 GitHub Action to install the just command runner
Stars: ✭ 21 (-83.97%)
Mutual labels:  actions, github-actions
gh-actions
A Github action for generating Terraform module documentation using terraform-docs and gomplate
Stars: ✭ 56 (-57.25%)
Mutual labels:  actions, github-actions
nrwl-nx-action
A GitHub Action to wrap Nrwl Nx commands in your workflows.
Stars: ✭ 163 (+24.43%)
Mutual labels:  actions, github-actions
labeler
GitHub Action to assign labels to PRs based on configurable conditions
Stars: ✭ 47 (-64.12%)
Mutual labels:  actions, github-actions
nextjs-github-pages
🚀 Deploy a Next.js app to Github Pages via Github Actions.
Stars: ✭ 89 (-32.06%)
Mutual labels:  actions, github-actions
html5validator-action
GitHub Action that checks HTML5 syntax.
Stars: ✭ 27 (-79.39%)
Mutual labels:  actions, github-actions
generate-og-image
Generate open graph images with Github Action from Markdown files
Stars: ✭ 32 (-75.57%)
Mutual labels:  actions, github-actions
add-an-issue-reference-action
A GitHub Action for adding a related issue reference to a pull request.
Stars: ✭ 19 (-85.5%)
Mutual labels:  actions, github-actions
verify-changed-files
Github action to verify file changes that occur during the workflow execution.
Stars: ✭ 62 (-52.67%)
Mutual labels:  actions, github-actions
rubocop-linter-action
Rubocop Linter Action: A GitHub Action to run Rubocop against your code!
Stars: ✭ 86 (-34.35%)
Mutual labels:  actions, github-actions
actions
Collection of repetitive GitHub Actions
Stars: ✭ 12 (-90.84%)
Mutual labels:  actions, github-actions

Zola Deploy Action

Build Status GitHub release (latest SemVer)

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

Table of Contents

Usage

This example will build and deploy to gh-pages on push to the main branch.

name: Zola on GitHub Pages

on: 
 push:
  branches:
   - main

jobs:
  build:
    name: Publish site
    runs-on: ubuntu-latest
    steps:
    - name: Checkout main
      uses: actions/[email protected]
    - name: Build and deploy
      uses: shalzz/zola-deploy-action@master
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

This example will build and deploy to gh-pages branch on a push to the main branch, and it will build only on pull requests.

name: Zola on GitHub Pages

on:
  push:
    branches:
      - main 
  pull_request:
  
jobs:
  build:
    runs-on: ubuntu-latest
    if: github.ref != 'refs/heads/main'
    steps:
      - name: Checkout main
        uses: actions/[email protected]
      - name: Build only 
        uses: shalzz/zola-deploy-action@master
        env:
          BUILD_DIR: docs
          BUILD_ONLY: true
          BUILD_FLAGS: --drafts
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          
  build_and_deploy:
    runs-on: ubuntu-latest
    if: github.ref == 'refs/heads/main'
    steps:
      - name: Checkout main
        uses: actions/[email protected]
      - name: Build and deploy
        uses: shalzz/zola-deploy-action@master
        env:
          BUILD_DIR: docs
          PAGES_BRANCH: gh-pages
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Environment Variables

  • PAGES_BRANCH: The git branch of your repo to which the built static files will be pushed. Default is gh-pages branch
  • REPOSITORY: The target repository to push to. Default is GITHUB_REPOSITORY(current repository). Set this variable if you want to deploy to other repo.
  • BUILD_DIR: The path from the root of the repo where we should run the zola build command. Default is . (current directory)
  • OUT_DIR: The build output directory of zola build. Default is public
  • BUILD_FLAGS: Custom build flags that you want to pass to zola while building. (Be careful supplying a different build output directory might break the action).
  • BUILD_ONLY: Set to value true if you don't want to deploy after zola build.
  • BUILD_THEMES: Set to false to disable fetching themes submodules. Default true.
  • CHECK_LINKS: Set to true to check links with zola check.
  • CHECK_FLAGS: Custom check flags that you want to pass to zola check.
  • GITHUB_HOSTNAME: The Github hostname to use in your action. This is to account for Enterprise instances where the base URL differs from the default, which is github.com.

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].