Skip to content

Commit

Permalink
CI: add custom build container
Browse files Browse the repository at this point in the history
This moves the jekyll build and gh-pages deployment stage into a
customer Github actions file.

Doing this will allow for us to use any custom jekyll plugins which
can't be used with Github's native build system for GH pages, and
therefore we only need to upload the result of the site generation.
  • Loading branch information
ThomasAdam committed Apr 10, 2024
1 parent 1187e5b commit 78a8786
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/jekyll-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Jekyll site CI

on:
push:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- 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:latest /bin/bash -c \
"apk update && \
apk add py3-pygments && \
chmod -R 777 /srv/jekyll && \
jekyll build --config _config.yml,_config-fvwm2rc.yml"
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ${{ github.workspace }}/_site
# Deployment job
deploy:
permissions:
pages: write # to deploy to Pages
id-token: write # to verify deployment from a trusted source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 78a8786

Please sign in to comment.