Archived
ddd
This commit is contained in:
@@ -19,14 +19,18 @@ jobs:
|
||||
- name: 远程执行部署
|
||||
run: |
|
||||
ssh -i ~/.ssh/deploy_key ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }} << EOF
|
||||
set -e
|
||||
cd ${{ secrets.DEPLOY_PATH }}
|
||||
git config --global --add safe.directory ${{ secrets.DEPLOY_PATH }}
|
||||
git pull origin main
|
||||
source venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
chown -R www:www .
|
||||
PID=\$(pgrep -f "Hulumath-Web-Demo/gunicorn_conf.py" | head -1)
|
||||
PID=\$(pgrep -f "gunicorn_conf.py" | head -1)
|
||||
if [ -n "\$PID" ]; then
|
||||
echo "重启gunicorn pid: \$PID"
|
||||
kill -HUP \$PID
|
||||
else
|
||||
echo "未找到gunicorn进程,跳过HUP重启"
|
||||
fi
|
||||
EOF
|
||||
Reference in New Issue
Block a user