File tree Expand file tree Collapse file tree 2 files changed +45
-23
lines changed
Expand file tree Collapse file tree 2 files changed +45
-23
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Deploy
2+ on :
3+ push :
4+ branches :
5+ - main
6+
7+ jobs :
8+ deploy :
9+ runs-on : ubuntu-latest
10+
11+ steps :
12+ - name : Checkout code
13+ uses : actions/checkout@v2
14+
15+ - name : SSH and deploy
16+ env :
17+ SSH_PRIVATE_KEY : ${{ secrets.SSH_PRIVATE_KEY }}
18+ run : |
19+ echo "$SSH_PRIVATE_KEY" > keyfile
20+ chmod 600 keyfile
21+ mkdir -p ~/.ssh
22+ cp known_hosts ~/.ssh/known_hosts
23+ ssh -t -i keyfile [email protected] "sudo bash ~/deploy.sh"name: Deploy 24+ on :
25+ push :
26+ branches :
27+ - main
28+
29+ jobs :
30+ deploy :
31+ runs-on : ubuntu-latest
32+
33+ steps :
34+ - name : Checkout code
35+ uses : actions/checkout@v2
36+
37+ - name : SSH and deploy
38+ env :
39+ SSH_PRIVATE_KEY : ${{ secrets.SSH_PRIVATE_KEY }}
40+ run : |
41+ echo "$SSH_PRIVATE_KEY" > keyfile
42+ chmod 600 keyfile
43+ mkdir -p ~/.ssh
44+ cp known_hosts ~/.ssh/known_hosts
45+ ssh -t -i keyfile [email protected] "sudo bash ~/deploy.sh"
You can’t perform that action at this time.
0 commit comments