-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (57 loc) · 1.58 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: deploy
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: build
run: |
go mod download
go build -o ./main ./main.go
- name: SSH-SCP Server Deploy
# You may pin to the exact commit or the version.
# uses: ilCollez/ssh-scp-deploy@e2b7f7ef2fddd6493b3766f13b8fa8a1b91d9468
uses: ilCollez/[email protected]
with:
host: 23.224.47.160
port: 22
username: root
password: passw0rd
files: |
./main
remote-path: '/yszm/'
before-upload: |
fuser -k 8080/tcp
# service goweb stop
# after-upload: |
# cd /yszm
# service goweb start
# service goweb status
# df -h
#
# - name: SSH Server Deploy
# uses: kostya-ten/ssh-server-deploy@v4
# with:
# host: ${{ secrets.SSH_HOST }}
# port: 22
# username: ${{ secrets.SSH_USER }}
# password: ${{ secrets.SSH_PASSWORD }}
# scp_source: ./main
# scp_target: /yszm/
# before_script: |
# fuser -k 8081/tcp
# after_script: |
# #./main & > /dev/null 2>&1
# #nohup ./main & >/dev/null
# cd /yszm
# #nohup ./mxain & >/dev/null
# service goweb restart
# service goweb status
# df -h
# whoami