A GitHub Action for building a Jekyll site (with custom plugins) and deploying it back to your gh-pages branch.
This document provides an analysis of a GitHub Action for Custom Jekyll Builds on GitHub Pages. The action allows users to build and deploy a Jekyll repository back to its gh-pages branch using their own custom Jekyll plugins and build scripts.
To install the GitHub Action for Custom Jekyll Builds on GitHub Pages, follow these steps:
.github/workflows/main.yml file:name: Jekyll Build and Deploy
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: Install Dependencies
run: |
gem install bundler
bundle install
- name: Build and Deploy
run: |
bundle exec jekyll build
# Add any additional build commands here
# Deploy the build files to the gh-pages branch using your preferred deployment method
Ensure that you have a Gemfile in your repository that includes the necessary dependencies, such as Jekyll and any custom gems.
Set the destination property to ./build in your _config.yml file.
Configure any custom Jekyll plugins or build scripts as needed.
Push your changes to the repository to trigger the GitHub Action.
The GitHub Action for Custom Jekyll Builds on GitHub Pages enables users to build and deploy Jekyll repositories back to their gh-pages branch. It provides the flexibility to use custom Jekyll plugins and build scripts, allowing for more customized and efficient deployments. By following the installation guide provided, users can easily set up and utilize this action in their GitHub workflows.