This GitHub action validates whether a Jekyll website contains the necessary configuration to successfully build using GitHub Pages. It is intended to be used in a continuous integration (CI) pipeline or as part of a testing process.
Optional This variable contains the location of the gemfile. By default, this is the root of the repository.
Optional This variable contains the location of the Jekyll website. By default, this is the root of the repository
The action outputs a value of "0" if the website builds correctly, and outputs a value of "1" if attempting to build the website fails. The action builds the website with the "--verbose" option; thus, looking at the action results can be helpful for troubleshooting failures.
The .github/workflows/automated-validation.yml file in this repository contains an example workflow that executes this action. Additionally, below are two examples for incorporating this action into an existing workflow:
- name: Checkout Repository
uses: actions/checkout@v3
- uses: PaulRosenthal/Jekyll-Deploy-Test-Action@v3
with:
gemfile-location: '/sample-jekyll-website'
site-directory: '/sample-jekyll-website'
- name: Checkout Repository
uses: actions/checkout@v3
- uses: PaulRosenthal/Jekyll-Deploy-Test-Action@v3
The test build files can be archived each time a workflow is executed, and downloaded for review or further verification.
In the example below, files from the test build will be saved in a zip file titled test_build:
- name: Checkout Repository
uses: actions/checkout@v3
- uses: PaulRosenthal/Jekyll-Deploy-Test-Action@v3
with:
gemfile-location: '/sample-jekyll-website'
site-directory: '/sample-jekyll-website'
- uses: actions/upload-artifact@v3.1.0
with:
name: test_build
path: sample-jekyll-website/_site