Fix Gitea Runner label and volume mounts
Some checks failed
deploy-docs / build-and-deploy (push) Failing after 22s

This commit is contained in:
2026-03-24 23:45:27 +00:00
parent e2d1e600d5
commit 025ba46632

View File

@@ -6,18 +6,26 @@ on:
jobs: jobs:
build-and-deploy: 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: steps:
- name: Checkout Docs Source - name: Checkout Docs Source
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Sync Markdown to Hugo Content - name: Sync Markdown to Hugo Site
run: | run: |
# Sync only the markdown files and assets to the Hugo content folder # Clean the existing content in the mounted Hugo site
# Exclude the .gitea directory rm -rf /hugo-site/content/*
rsync -av --delete --exclude '.gitea' --exclude '.git' ./ /srv/dev/hugo/wiki/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: | run: |
cd /srv/dev/hugo/wiki cd /hugo-site
/usr/bin/hugo --destination /srv/caddy/sites/wiki --cleanDestinationDir hugo --minify --destination /deploy/wiki