diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index b82412a..c882ba9 100755 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -31,6 +31,14 @@ jobs: echo -n "提交消息: ${{ github.event.head_commit.message }}">> notify.tpl cat notify.tpl | envsubst | jq -sR . | xargs -0 -I {} curl -H "Content-Type: application/json" -X POST -d '{"type":"text","msg":{} }' https://amass.fun/notify - run: resources/build.sh build + - name: Stop server + uses: appleboy/ssh-action@v0.1.3 + with: + host: ${{ vars.YUYUN_SERVER }} + username: ${{ vars.YUYUN_USER }} + password: ${{ secrets.SERVER_ROOT_PASSWORD }} + script: | + pkill -f HttpServer || true - name: Copy files to server uses: appleboy/scp-action@v0.1.7 with: @@ -49,8 +57,6 @@ jobs: password: ${{ secrets.SERVER_ROOT_PASSWORD }} script: | cd /root/Server - pkill -f HttpServer || true - cp /root/Server/HttpServer /root/Server/HttpServer.bak source /etc/profile nohup /root/Server/HttpServer > /dev/null 2>&1 & exit 0