test
Some checks failed
Build Website / build (push) Failing after 0s

This commit is contained in:
Jean-Michel Tremblay 2026-04-23 19:23:52 -04:00
parent 80cbb6f32a
commit 6a03437153

View file

@ -40,22 +40,17 @@ jobs:
mkdir -p "$PWD/.hugo-cache" mkdir -p "$PWD/.hugo-cache"
chmod -R 777 "$PWD/.hugo-cache" chmod -R 777 "$PWD/.hugo-cache"
# We pass the Git config as an environment variable to bypass the 'dubious ownership'
docker run --rm \ docker run --rm \
-v "$PWD:/src" \ -v "$PWD:/src" \
-v "$PWD/.hugo-cache:/cache" \ -v "$PWD/.hugo-cache:/cache" \
-e GOPATH=/cache \ -e GOPATH=/cache \
-e HUGO_CACHEDIR=/cache \ -e HUGO_CACHEDIR=/cache \
-e GIT_CONFIG_COUNT=1 \
-e GIT_CONFIG_KEY_0=safe.directory \
-e GIT_CONFIG_VALUE_0=/src \
-w /src/site \ -w /src/site \
forgejo.jmopines.com/jm/hugo-git:latest \ forgejo.jmopines.com/jm/hugo-git:latest \
--minify --enableGitInfo --noTimes --destination "public" --baseURL "/" sh -c "git config --global --add safe.directory /src && hugo --minify --enableGitInfo --noTimes --destination public --baseURL /"
# Ensure the forgejo user owns the output so rsync can read it # Clean up ownership so the host user can rsync it
# (Docker root often leaves files owned by root) sudo chown -R forgejo:forgejo site/public || true
sudo chown -R forgejo:forgejo site/public
- name: Deploy - name: Deploy
run: | run: |
set -ex set -ex