From 38911f58facf61aa0e707a8b9e432fabc49ce767 Mon Sep 17 00:00:00 2001 From: W1ndys Date: Thu, 13 Feb 2025 07:57:50 +0800 Subject: [PATCH] feat(update_site.sh): Add Clash network management during site deployment - Added `clashon` before repository cloning - Added `clashoff` after successful deployment - Ensures proper network configuration during site update process --- update_site_scripts/update_site.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/update_site_scripts/update_site.sh b/update_site_scripts/update_site.sh index e64239509..26790cbd7 100644 --- a/update_site_scripts/update_site.sh +++ b/update_site_scripts/update_site.sh @@ -19,6 +19,9 @@ log() { rm -rf "$WORK_DIR" && \ mkdir -p "$WORK_DIR" && \ + # 开启clash + clashon + # 尝试通过 SSH 克隆仓库 log "尝试通过 SSH 克隆仓库: $REPO_URL" if ! git clone --depth 1 -b gh-pages "$REPO_URL" "$WORK_DIR"; then @@ -47,6 +50,10 @@ log() { log "部署完成" # 如果所有命令成功执行,调用Python脚本报告成功 + + # 关闭clash + clashoff + python3 update_site.py --status success } || { # 如果有任何命令失败,调用Python脚本报告错误