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-23 09:34:47 +00:00
|
|
|
_USER: appuser
|
|
|
|
_GROUP: appgroup
|
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 09:34:47 +00:00
|
|
|
# The environment variables _UID, _GID, _USER and _GROUP will impact this image
|
2024-05-22 12:50:47 +00:00
|
|
|
docker-compose build jekyll
|
2024-05-23 09:37:03 +00:00
|
|
|
- name: Verify Jekyll container
|
|
|
|
id: verify_image
|
|
|
|
run: |
|
|
|
|
docker-compose run --rm -v "${JOB_CONTAINER_NAME}/:/home/${USER}/workspace" \
|
|
|
|
--entrypoint bash \
|
|
|
|
jekyll -c "whoami; pwd; ls -lA ."
|
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:34:47 +00:00
|
|
|
docker-compose run --rm -v "${JOB_CONTAINER_NAME}:/home/${_USER}/workspace" \
|
2024-05-23 09:21:02 +00:00
|
|
|
jekyll build --verbose
|
2024-05-22 15:37:08 +00:00
|
|
|
- name: Verify site
|
|
|
|
id: verify_site
|
2024-05-22 17:37:24 +00:00
|
|
|
# uses: LeastAuthority/broken-links-action@v1
|
|
|
|
# with:
|
|
|
|
# path: ./_site
|
|
|
|
run: |
|
|
|
|
python3 --version
|
|
|
|
wget --version
|