From 00bb034eca9b79f7dae385c151cae662917ee116 Mon Sep 17 00:00:00 2001 From: fukunee Date: Sun, 24 May 2026 22:51:16 +0800 Subject: [PATCH] Migrate Hugo blog source to local git server Update git remote and sync script to use local git server at fukun.net instead of GitHub --- hosts/tx-ubuntu-hugo.yml | 2 +- scripts/sync-blog@tx-ubuntu-hugo.sh | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hosts/tx-ubuntu-hugo.yml b/hosts/tx-ubuntu-hugo.yml index 163e30a..a9cf12d 100644 --- a/hosts/tx-ubuntu-hugo.yml +++ b/hosts/tx-ubuntu-hugo.yml @@ -36,6 +36,6 @@ billing: # --- 服务 --- # Hugo 博客 · https://fukun.net -# 源码: ~/hugo-blog (git remote: github.com/fukunee/Hugo) +# 源码: ~/hugo-blog (git remote claw: git@fukun.net:/data/git-repos/Hugo.git) # 同步: claw run tx-ubuntu-hugo sync-blog@tx-ubuntu-hugo.sh # Nginx · HTTP/HTTPS 反向代理 diff --git a/scripts/sync-blog@tx-ubuntu-hugo.sh b/scripts/sync-blog@tx-ubuntu-hugo.sh index 0b016c0..3a26e42 100644 --- a/scripts/sync-blog@tx-ubuntu-hugo.sh +++ b/scripts/sync-blog@tx-ubuntu-hugo.sh @@ -7,20 +7,20 @@ # 适用: Ubuntu 24.04, Hugo 0.161+ # # 前置条件: -# - ~/hugo-blog 已 git clone 且 remote 指向 github.com:fukunee/Hugo +# - ~/hugo-blog 已 git clone 且 remote claw 指向 git@fukun.net:/data/git-repos/Hugo.git # - hugo 已安装 # - nginx 指向 ~/hugo-blog/public # # 流程: -# 1. git pull — 拉取最新文章和配置 -# 2. hugo build — 重建静态页面到 public/ +# 1. git pull claw master — 从本地 git 服务器拉取 +# 2. hugo build — 重建静态页面到 public/ # ============================================================ set -e cd ~/hugo-blog -echo ">>> git pull..." -git pull +echo ">>> git pull claw master..." +git pull claw master echo ">>> hugo build..." hugo --minify