Copy config.toml before building to ensure Hugo can find deployment targets
Build and deploy Hugo site / build (push) Failing after 9s

This commit is contained in:
YaoLei
2026-07-06 10:38:50 +08:00
parent 66c48042ed
commit a472675714
+5 -2
View File
@@ -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