Skip to content

Add CI to check that we can build the production site #3

Add CI to check that we can build the production site

Add CI to check that we can build the production site #3

Workflow file for this run

name: Test PR
on:
pull_request:
types: [ opened, synchronize, reopened ]
jobs:
build:
runs-on: ubuntu-latest
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
# this is required for the subsequent build to be able to push to the registry on localhost:5000
driver-opts: network=host
- name: Build Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: localhost:5000/kroxy-jekyll:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build with Jekyll
run: |
docker run \
--rm \
-u "$(id -u):$(id -g)" \
-v "$(pwd):/site" \
localhost:5000/kroxy-jekyll:latest \
bash -c 'eval "$(rbenv init -)" && cp -r /css/_sass/bootstrap /site/_sass/ && JEKYLL_ENV=production bundle exec jekyll build --config=_config.yml'