2024-05-15 07:22:46 +00:00
|
|
|
name: Jekyll
|
2024-05-23 12:09:30 +00:00
|
|
|
on:
|
|
|
|
push:
|
2024-05-23 12:13:52 +00:00
|
|
|
branches:
|
|
|
|
- main
|
2024-05-23 12:09:30 +00:00
|
|
|
pull_request:
|
2024-05-15 07:22:46 +00:00
|
|
|
|
2024-05-23 09:21:02 +00:00
|
|
|
env:
|
|
|
|
_UID: 1000
|
|
|
|
_GID: 1000
|
2024-05-15 07:22:46 +00:00
|
|
|
jobs:
|
2024-05-23 09:21:02 +00:00
|
|
|
jekyll:
|
2024-05-22 10:23:10 +00:00
|
|
|
runs-on: ubuntu-22.04
|
2024-05-15 07:22:46 +00:00
|
|
|
steps:
|
2024-05-23 12:09:30 +00:00
|
|
|
- name: Check out repository
|
2024-05-15 07:44:19 +00:00
|
|
|
id: checkout
|
2024-05-15 07:22:46 +00:00
|
|
|
uses: actions/checkout@v4
|
2024-05-23 12:09:30 +00:00
|
|
|
- name: Change file ownership
|
|
|
|
id: file_ownership
|
2024-05-22 12:57:55 +00:00
|
|
|
run: |
|
2024-05-23 09:21:02 +00:00
|
|
|
chown -R ${_UID}:${_GID} .
|
2024-05-15 07:57:11 +00:00
|
|
|
- name: Install docker
|
|
|
|
id: install_docker
|
|
|
|
run: |
|
2024-05-22 11:52:09 +00:00
|
|
|
apt-get -q update
|
|
|
|
apt-get -q install -y docker-compose
|
|
|
|
apt-get -q clean
|
2024-05-15 07:57:11 +00:00
|
|
|
- name: Verify docker
|
2024-05-15 07:44:19 +00:00
|
|
|
id: verify_docker
|
|
|
|
run: |
|
|
|
|
docker run --rm hello-world:latest > /dev/null
|
|
|
|
docker rmi hello-world:latest > /dev/null
|
|
|
|
docker version
|
2024-05-22 14:22:52 +00:00
|
|
|
docker-compose version
|
2024-05-22 13:58:38 +00:00
|
|
|
docker volume ls
|
2024-05-22 12:30:15 +00:00
|
|
|
- name: Build Jekyll image
|
|
|
|
id: build_image
|
|
|
|
run: |
|
2024-05-23 10:03:39 +00:00
|
|
|
# The environment variables _UID and _GID can impact this image
|
2024-05-22 12:50:47 +00:00
|
|
|
docker-compose build jekyll
|
2024-05-22 12:34:17 +00:00
|
|
|
- name: Build Jekyll site
|
2024-05-22 12:30:15 +00:00
|
|
|
id: build_site
|
|
|
|
run: |
|
2024-05-23 12:11:27 +00:00
|
|
|
docker-compose run --rm -v "${JOB_CONTAINER_NAME}:/site" -w /site \
|
2024-05-23 09:21:02 +00:00
|
|
|
jekyll build --verbose
|