From 227fbe202c93e1537de442447ef7c7537a049cac Mon Sep 17 00:00:00 2001 From: Thanwer Date: Sat, 23 May 2026 18:01:02 +0200 Subject: [PATCH] Add Gitea Actions deploy workflow Builds Hugo and writes the output to /srv/www/blog on push to main. Runs in a node:20-bookworm container with /srv/www bind-mounted from the shinobi host (allowed via the gitea-runner's valid_volumes config). Caddy on the host serves /srv/www/blog directly. Co-Authored-By: Claude Opus 4.7 --- .gitea/workflows/deploy.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .gitea/workflows/deploy.yml diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..645e765 --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,30 @@ +name: Deploy + +on: + push: + branches: [main] + workflow_dispatch: + +env: + HUGO_VERSION: "0.151.0" + +jobs: + deploy: + runs-on: ubuntu-latest + container: + image: node:20-bookworm + volumes: + - /srv/www:/srv/www + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: 0 + + - name: Install Hugo extended + run: | + curl -sL "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-arm64.tar.gz" | tar xz + install hugo /usr/local/bin/ + + - name: Build and deploy to /srv/www/blog + run: hugo --gc --minify --cleanDestinationDir --destination /srv/www/blog