Files
blog/.gitea/workflows/publish.yml
T
gnoc bot 97b28812d8
publish / build-and-publish (push) Successful in 12s
gnoc: install/update hugo scaffold
2026-04-16 22:00:58 +00:00

38 lines
1.1 KiB
YAML

# Published to fam/blog:.gitea/workflows/publish.yml by app/hugo/install.
# Runs on the gnoc-host act_runner (host mode — job executes directly in
# the gnoc user's shell), so we can rsync into /var/gnoc/hugo-public where
# the gnoc-hugo nginx pod reads via hostPath.
name: publish
on:
push:
branches: [main]
jobs:
build-and-publish:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 1
- name: Install Hugo
run: |
set -euo pipefail
HUGO_VERSION=0.147.6
TAR="hugo_extended_0.147.6_linux-amd64.tar.gz"
curl -fsSL -o "$RUNNER_TEMP/hugo.tar.gz" \
"https://github.com/gohugoio/hugo/releases/download/v0.147.6/${TAR}"
tar -xzf "$RUNNER_TEMP/hugo.tar.gz" -C "$RUNNER_TEMP" hugo
echo "$RUNNER_TEMP" >> "$GITHUB_PATH"
- name: Build
run: hugo --minify --gc
- name: Publish
run: |
set -euo pipefail
rsync -az --delete public/ /var/gnoc/hugo-public/