test
All checks were successful
Build Website / build (push) Successful in 1s

This commit is contained in:
Jean-Michel Tremblay 2026-04-23 19:33:34 -04:00
parent 8aea75ef03
commit 9e216d6344

View file

@ -36,23 +36,16 @@ jobs:
# rm /tmp/deploy_key # rm /tmp/deploy_key
- name: Build - name: Build
run: | run: |
set -ex mkdir -p "$PWD/.hugo-cache"
# 1. Create a permanent cache folder on the VM so it doesn't redownload every time docker run --rm \
mkdir -p /home/forgejo/hugo_cache -u "$(id -u):$(id -g)" \
chmod 777 /home/forgejo/hugo_cache -v "$PWD/site:/src" \
-v "$PWD/.git:/src/.git:ro" \
# 2. Run with a 60-second timeout. If it takes longer, something is wrong. -v "$PWD/.hugo-cache:/cache" \
# We add --network host to ensure the container can see the internet/local gitea
timeout 60s docker run --rm \
--entrypoint /bin/sh \
--network host \
-v "$PWD:/src" \
-v "/home/forgejo/hugo_cache:/cache" \
-e HUGO_CACHEDIR=/cache \
-e GOPATH=/cache \ -e GOPATH=/cache \
-w /src/site \ -w /src \
forgejo.jmopines.com/jm/hugo-git:latest \ forgejo.jmopines.com/jm/hugo-git:latest \
-c "git config --global --add safe.directory /src && hugo --minify --enableGitInfo --noTimes --destination public" --minify --destination "public" --baseURL "/"
- name: Deploy - name: Deploy
run: | run: |
set -ex set -ex