Skip to content

Jekyll CI

Jekyll CI #359

# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository. You may wish to alter this file to override
# the set of languages analyzed, or to provide custom queries or build logic.
name: "Jekyll CI"
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
# Triggers the workflow on push or pull request events but only for the main branch
schedule:
# Runs at 6am UTC every Monday
- cron: "0 6 * * 1"
jobs:
# Check the Jekyll itself for errors and syntax
build:
name: Jekyll Build
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Check that the Jekyll can actually build
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build the site in the jekyll-docker container
run: |
docker run \
-v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \
jvconseil/jekyll-docker:4.3.3 /bin/bash -c "chmod -R 777 /srv/jekyll && jekyll build --future"
# - name: Build the site in the jekyll/builder container
# run: |
# docker run \
# -v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \
# jekyll/builder:4.3.3 /bin/bash -c "chmod -R 777 /srv/jekyll && jekyll build --future"
# - name: Build the site in the jekyll/builder container
# run: |
# docker run \
# -v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \
# jekyll/builder:pages /bin/bash -c "chmod -R 777 /srv/jekyll && jekyll build --future"
# Then check the markdown files are properly formatted
analyse:
name: Markdown Lint
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Check markdown files are markdown-lint compliant
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Lint markdown files with markdown-lint
uses: articulate/[email protected]
with:
# Includes some specific rules to ignore
config: .github/workflows/markdownlint-config.json
files: "_posts/**/*.md"
# Ignore the built website, might have some funky files
ignore: _site/
# Try to fix basic errors
fix: true