ci: 加 mount fail-fast,防止 silent success(rsync 写到 job 容器临时目录)
Build and Deploy Blog / build (push) Failing after 1m48s

诊断 act_runner container.options 是否真生效,避免 build 0 退出码但 NAS 上是空目录。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-03 16:21:28 +08:00
parent 9c6188c2f7
commit 40a38c8c14
+19
View File
@@ -39,6 +39,25 @@ jobs:
- name: Build site
run: hugo --gc --minify
- name: Verify /blog-public is host-mounted
# 必须 fail-fast,否则 rsync 写到 job 容器临时目录(act_runner container.options
# 没生效时 rsync 会自动建临时 /blog-public),build 显示成功但 NAS 上是空的
run: |
if ! mount | grep -qE '\s/blog-public\s'; then
echo "::error::/blog-public is NOT a host mount."
echo "act_runner container.options likely not effective. Check runner config + restart."
echo ""
echo "=== /blog-public state ==="
ls -la /blog-public/ 2>&1 || true
echo ""
echo "=== mount table (top 30) ==="
mount | head -30
exit 1
fi
echo "mount verified:"
mount | grep '/blog-public'
ls -la /blog-public/
- name: Ensure rsync available
run: which rsync || (sudo apt-get update -qq && sudo apt-get install -y -qq rsync)