From 025ba466323e301820e5e0944d00f834dfc875c2 Mon Sep 17 00:00:00 2001 From: wompmacho Date: Tue, 24 Mar 2026 23:45:27 +0000 Subject: [PATCH] Fix Gitea Runner label and volume mounts --- .gitea/workflows/deploy.yaml | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 7e63ce2..095a6c7 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -6,18 +6,26 @@ on: jobs: build-and-deploy: - runs-on: self-hosted + runs-on: ubuntu-latest + container: + image: hugomods/hugo:latest + # Mount the Hugo site structure AND the deployment target + options: --user root -v /srv/caddy/sites:/deploy -v /srv/dev/hugo/wiki:/hugo-site + steps: - name: Checkout Docs Source uses: actions/checkout@v4 - - name: Sync Markdown to Hugo Content + - name: Sync Markdown to Hugo Site run: | - # Sync only the markdown files and assets to the Hugo content folder - # Exclude the .gitea directory - rsync -av --delete --exclude '.gitea' --exclude '.git' ./ /srv/dev/hugo/wiki/content/ + # Clean the existing content in the mounted Hugo site + rm -rf /hugo-site/content/* + # Copy the new content from this repo into the Hugo content folder + cp -r . /hugo-site/content/ + # Remove Git-related metadata from the content folder + rm -rf /hugo-site/content/.git /hugo-site/content/.gitea - - name: Build Hugo Site + - name: Build and Deploy Hugo run: | - cd /srv/dev/hugo/wiki - /usr/bin/hugo --destination /srv/caddy/sites/wiki --cleanDestinationDir + cd /hugo-site + hugo --minify --destination /deploy/wiki