2024-05-15 07:22:46 +00:00
|
|
|
name: Jekyll
|
|
|
|
run-name: ${{ gitea.actor }} is running some Gitea Actions 🚀
|
|
|
|
on: [push]
|
|
|
|
|
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:
|
|
|
|
- name: Check out repository code
|
2024-05-15 07:44:19 +00:00
|
|
|
id: checkout
|
2024-05-15 07:22:46 +00:00
|
|
|
uses: actions/checkout@v4
|
2024-05-22 12:57:55 +00:00
|
|
|
- name: Fix file permissions
|
|
|
|
id: fix_permissions
|
|
|
|
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 09:56:49 +00:00
|
|
|
docker-compose run --rm -v "${JOB_CONTAINER_NAME}:/appdata" \
|
2024-05-23 09:21:02 +00:00
|
|
|
jekyll build --verbose
|