A selection of Actions which both build a Jekyll site and publish it GH Pages, so you need one action instead of two

Here are some available actions in the marketplace.

I haven’t tried all these out and there are a lot more in the marketplace, using different approaches and configurations.

Jekyll 4 Build Deploy

Jekyll Deploy GH Pages

Marketplace

Jekyll Actions

The downsides of this action are:

  • it does not work with GITHUB_TOKEN so is less secure and
  • it uses Docker so can be slow (according to the README doc).

I have a demo which uses this action here MichaelCurrin/jekyll-actions-quickstart

Jekyll Action TS

Repo link

This is fork of the one above. It uses TypeScript instead of Docker so should be quicker to download and handle non-default use-cases.

Sample usage from the docs:

name: Build and deploy

on:
  push:
    branches:
      - master

jobs:
  jekyll:
    runs-on: ubuntu-latest
    steps:
      - name: πŸ“‚ Checkout
        uses: actions/checkout@v2

      - name: πŸ’Ž Setup ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: 2.7

      - name: πŸ”¨ Install dependencies and build site
        uses: limjh16/jekyll-action-ts@v2
        with:
          enable_cache: true

      - name: πŸš€ Deploy
        uses: peaceiris/actions-gh-pages@v3
        with:
          github_token: $
          publish_dir: _site