重建个人应用入口与静态博客,保留旧文章并支持本地发布

This commit is contained in:
fam
2026-09-21 12:03:38 +01:00
parent 76562f77e3
commit f1586d240e
17 changed files with 356 additions and 191 deletions
+6 -30
View File
@@ -1,37 +1,13 @@
# 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
name: verify
on:
push:
branches: [main]
pull_request:
jobs:
build-and-publish:
verify:
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/
- name: Verify custom static site
run: make test
# Production: make deploy from the local development machine.