fix: prevent nginx default page in hugo image
Some checks failed
Deploy Hugo Blog to k3s / build-and-deploy (push) Failing after 24s

This commit is contained in:
luochen570
2026-06-02 08:47:13 +08:00
parent 06185c71d7
commit a2aec46cc0
2 changed files with 16 additions and 2 deletions

View File

@@ -25,6 +25,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Hugo
run: |
@@ -63,7 +65,16 @@ jobs:
hugo version
- name: Hugo Build
run: hugo --minify
run: |
set -euo pipefail
rm -rf public
hugo --minify
test -s public/index.html
if grep -q "Welcome to nginx" public/index.html; then
echo "public/index.html is nginx default page, aborting" >&2
exit 1
fi
grep -q "洛尘的技术笔记" public/index.html
- name: Build and Push Docker Image
env: