This commit is contained in:
2026-08-08 17:13:35 +08:00
parent 3320094814
commit 3ddaa671c8
+4 -9
View File
@@ -23,14 +23,9 @@ jobs:
cd ${{ secrets.DEPLOY_PATH }} cd ${{ secrets.DEPLOY_PATH }}
git config --global --add safe.directory ${{ secrets.DEPLOY_PATH }} git config --global --add safe.directory ${{ secrets.DEPLOY_PATH }}
git pull origin main git pull origin main
source venv/bin/activate # 严格匹配文件夹拼写 pyporject_evn
pip install -r requirements.txt /www/server/pyporject_evn/versions/3.12.13/bin/pip install -r requirements.txt
chown -R www:www . chown -R www:www .
PID=\$(pgrep -f "gunicorn_conf.py" | head -1) # 宝塔项目重启脚本不变
if [ -n "\$PID" ]; then /www/server/panel/pyenv/bin/python3 /www/server/panel/plugin/python/project.py restart Hulumath-Web-Demo
echo "重启gunicorn pid: \$PID"
kill -HUP \$PID
else
echo "未找到gunicorn进程,跳过HUP重启"
fi
EOF EOF