We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 02148f7 commit 8f4d631Copy full SHA for 8f4d631
.github/workflows/deploy.yml
@@ -75,9 +75,16 @@ jobs:
75
script: |
76
cd /opt/TinyFlow
77
78
- # 拉取最新代码并强制丢弃本地更改
79
- git fetch origin
80
- git reset --hard origin/master
+ # 拉取最新代码并强制丢弃本地更改(重试机制)
+ for i in 1 2 3; do
+ if git fetch origin; then
81
+ git reset --hard origin/master
82
+ break
83
+ else
84
+ echo "⚠️ git fetch 失败,第 $i 次重试..."
85
+ sleep 2
86
+ fi
87
+ done
88
89
# 更新 systemd 配置文件中的环境变量
90
sudo sed -i "s|Environment=\"APP_DOMAIN=.*\"|Environment=\"APP_DOMAIN=$APP_DOMAIN\"|g" /etc/systemd/system/tinyflow.service
0 commit comments