diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 19ceddb..79cc9f8 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -18,25 +18,20 @@ jobs: with: hugo-version: 'latest' - - name: Ensure Output Directory Exists - run: | - mkdir -p /data/hugo/public - chmod -R 777 /data/hugo/public - - name: Debug Working Directory run: | pwd ls -la - find . -name "hugo.toml" - hugo config + echo "Current directory structure:" + find . -type f - name: Build Hugo Site - working-directory: /workspace/john/hugo-blog run: | - hugo --minify -d /data/hugo/public --config hugo.toml + # Build directly in the workspace, then copy to the mounted volume + hugo --minify - # Verify the build was successful - if [ ! -d /data/hugo/public ]; then - echo "Hugo build failed - public directory not created" - exit 1 - fi + # Copy the generated files to the mounted volume + cp -r public/* /data/hugo/public/ + + # Verify the copy was successful + ls -la /data/hugo/public/