Implement Jekyll CI workflow with docker #2

Merged
btlogy merged 60 commits from 1.test-ci into main 2024-05-23 12:16:39 +00:00
2 changed files with 6 additions and 10 deletions
Showing only changes of commit 85ce376ad0 - Show all commits

View File

@ -5,6 +5,8 @@ on: [push]
env:
_UID: 1000
_GID: 1000
_USER: appuser
_GROUP: appgroup
jobs:
jekyll:
runs-on: ubuntu-22.04
@ -33,18 +35,12 @@ jobs:
- name: Build Jekyll image
id: build_image
run: |
# The environment variables _UID and _GID will impact this image
# The environment variables _UID, _GID, _USER and _GROUP will impact this image
docker-compose build jekyll
- name: Verify Jekyll container
id: verify_image
run: |
docker-compose run --rm -v "/var/lib/docker/volumes/${JOB_CONTAINER_NAME}/_data:/home/ubuntu/workspace" \
--entrypoint bash \
jekyll -c "whoami; pwd; ls -lA ."
- name: Build Jekyll site
id: build_site
run: |
docker-compose run --rm -v "/var/lib/docker/volumes/${JOB_CONTAINER_NAME}/_data:/home/ubuntu/workspace" \
docker-compose run --rm -v "${JOB_CONTAINER_NAME}:/home/${_USER}/workspace" \
jekyll build --verbose
- name: Verify site
id: verify_site

View File

@ -10,9 +10,9 @@ RUN INSTALL_PKGS="gcc g++ libyaml-dev make nodejs" && \
# Parameters for default user:group
ARG uid=1000
ARG user=ubuntu
ARG user=appuser
ARG gid=1000
ARG group=ubuntu
ARG group=appgroup
# Ensure desired user and group for build and runtime (convenient)
RUN userdel --force --remove $(getent passwd ${uid} | cut -d: -f1) || true; \