|
| 1 | +name: Deploy |
| 2 | + |
1 | 3 | on: [push]
|
2 | 4 |
|
3 | 5 | jobs:
|
4 | 6 | build:
|
5 |
| - |
6 | 7 | runs-on: ubuntu-latest
|
7 | 8 |
|
8 | 9 | steps:
|
9 |
| - - uses: actions/checkout@v1 |
| 10 | + - name: Checkout the repository |
| 11 | + uses: actions/checkout@v3 |
10 | 12 |
|
11 | 13 | - name: Copy repository contents via scp
|
12 | 14 | uses: appleboy/scp-action@master
|
13 |
| - env: |
14 |
| - HOST: ${{ secrets.HOST }} |
15 |
| - USERNAME: ${{ secrets.USERNAME }} |
16 |
| - PORT: ${{ secrets.PORT }} |
17 |
| - KEY: ${{ secrets.SSHKEY }} |
18 | 15 | with:
|
| 16 | + host: ${{ secrets.HOST }} |
| 17 | + username: ${{ secrets.USERNAME }} |
| 18 | + port: ${{ secrets.PORT }} |
| 19 | + key: ${{ secrets.SSHKEY }} |
19 | 20 | source: "."
|
20 |
| - target: "/var/www/mywebsite" |
| 21 | + target: "/root/asu-soda-newsite" |
21 | 22 |
|
22 |
| - - name: Executing remote command |
| 23 | + - name: Executing remote deployment script |
23 | 24 | uses: appleboy/ssh-action@master
|
24 | 25 | with:
|
25 | 26 | host: ${{ secrets.HOST }}
|
26 |
| - USERNAME: ${{ secrets.USERNAME }} |
27 |
| - PORT: ${{ secrets.PORT }} |
28 |
| - KEY: ${{ secrets.SSHKEY }} |
29 |
| - script: /root/asu-soda-newsite/CD.sh |
| 27 | + username: ${{ secrets.USERNAME }} |
| 28 | + port: ${{ secrets.PORT }} |
| 29 | + key: ${{ secrets.SSHKEY }} |
| 30 | + script: | |
| 31 | + sudo /root/asu-soda-newsite/CD.sh |
0 commit comments