From a4726757140d1e902c9446dc6fa95d3182d66287 Mon Sep 17 00:00:00 2001 From: YaoLei <1049031269@qq.com> Date: Mon, 6 Jul 2026 10:38:50 +0800 Subject: [PATCH] Copy config.toml before building to ensure Hugo can find deployment targets --- .gitea/workflows/deploy.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 53abc5d..b55c9a6 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -23,6 +23,11 @@ jobs: echo "Cloning $REPO_URL to content directory" git clone --depth=1 "$REPO_URL" /tmp/hugo-site/content + - name: Copy config file to Hugo site + run: | + set -e + cp /tmp/hugo-site/content/config.toml /tmp/hugo-site/ + - name: Build site with Hugo working-directory: /tmp/hugo-site run: | @@ -39,8 +44,6 @@ jobs: working-directory: /tmp/hugo-site run: | set -e - # Copy config file from content directory to Hugo site root - cp content/config.toml /tmp/hugo-site/ # Setup SSH key for Hugo deploy mkdir -p ~/.ssh echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa