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
|
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
|
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
|
- 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
|
- name: Copy files to server
|
||||||
uses: appleboy/scp-action@v0.1.7
|
uses: appleboy/scp-action@v0.1.7
|
||||||
with:
|
with:
|
||||||
@ -49,7 +40,7 @@ jobs:
|
|||||||
overwrite: true
|
overwrite: true
|
||||||
strip_components: 2
|
strip_components: 2
|
||||||
source: build/Server/HttpServer
|
source: build/Server/HttpServer
|
||||||
target: /root/Server
|
target: /tmp
|
||||||
- name: Restart server
|
- name: Restart server
|
||||||
uses: appleboy/ssh-action@v1.1.0
|
uses: appleboy/ssh-action@v1.1.0
|
||||||
with:
|
with:
|
||||||
@ -59,7 +50,9 @@ jobs:
|
|||||||
script: |
|
script: |
|
||||||
cd /root/Server
|
cd /root/Server
|
||||||
source /etc/profile
|
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
|
exit 0
|
||||||
- name: Notify-End
|
- name: Notify-End
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
|
Loading…
Reference in New Issue
Block a user