deploy libraries.
This commit is contained in:
parent
2c52c9387f
commit
b6171695e7
@ -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() }}
|
||||
|
Loading…
Reference in New Issue
Block a user