From b6171695e74afb1e0f3d3b08f66fd877d69afab2 Mon Sep 17 00:00:00 2001 From: amass <168062547@qq.com> Date: Sat, 9 Nov 2024 23:17:12 +0800 Subject: [PATCH] deploy libraries. --- .gitea/workflows/deploy.yaml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 6a9bef5..3ffdf6d 100755 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -31,15 +31,6 @@ 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@v1.1.0 - with: - host: ${{ vars.YUYUN_SERVER }} - username: ${{ vars.YUYUN_USER }} - password: ${{ secrets.SERVER_ROOT_PASSWORD }} - script: | - pgrep -f HttpServer | xargs -r kill -s 9 - exit 0 - name: Copy files to server uses: appleboy/scp-action@v0.1.7 with: @@ -49,7 +40,7 @@ jobs: overwrite: true strip_components: 2 source: build/Server/HttpServer - target: /root/Server + target: /tmp - name: Restart server uses: appleboy/ssh-action@v1.1.0 with: @@ -59,7 +50,9 @@ jobs: script: | cd /root/Server source /etc/profile - nohup /root/Server/HttpServer > /dev/null 2>&1 & + echo "这里需要先停止原来的HttpServer, 然后再将/tmp/HttpServer拷贝至/root/Server" + # pgrep -f HttpServer | xargs -r kill -s 9 + # nohup /root/Server/HttpServer > /dev/null 2>&1 & exit 0 - name: Notify-End if: ${{ always() }}