From 41b19efd3006cbf57a5a86c705d7025eebaaefba Mon Sep 17 00:00:00 2001 From: John Date: Sat, 8 Mar 2025 22:19:26 -0600 Subject: [PATCH] try different workflow setup --- .gitea/workflows/build.yml | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index c396b81..19ceddb 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -14,24 +14,29 @@ jobs: uses: actions/checkout@v4 - name: Install Hugo - run: | - apt update - apt install -y hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: 'latest' - - name: Build Hugo Site + - name: Ensure Output Directory Exists + run: | + mkdir -p /data/hugo/public + chmod -R 777 /data/hugo/public + + - name: Debug Working Directory run: | - # Print working directory for debugging pwd ls -la - - # Navigate to Hugo site directory if it's in a subdirectory - cd /data/git/repositories/john/hugo + find . -name "hugo.toml" + hugo config - # Build directly to the mounted public directory - hugo --minify -d /data/hugo/public + - name: Build Hugo Site + working-directory: /workspace/john/hugo-blog + run: | + hugo --minify -d /data/hugo/public --config hugo.toml # Verify the build was successful if [ ! -d /data/hugo/public ]; then echo "Hugo build failed - public directory not created" exit 1 - fi \ No newline at end of file + fi