Skip to content

Commit 6cad381

Browse files
Update CD..yml
1 parent a05370d commit 6cad381

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

.github/workflows/CD..yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
1+
name: Deploy
2+
13
on: [push]
24

35
jobs:
46
build:
5-
67
runs-on: ubuntu-latest
78

89
steps:
9-
- uses: actions/checkout@v1
10+
- name: Checkout the repository
11+
uses: actions/checkout@v3
1012

1113
- name: Copy repository contents via scp
1214
uses: appleboy/scp-action@master
13-
env:
14-
HOST: ${{ secrets.HOST }}
15-
USERNAME: ${{ secrets.USERNAME }}
16-
PORT: ${{ secrets.PORT }}
17-
KEY: ${{ secrets.SSHKEY }}
1815
with:
16+
host: ${{ secrets.HOST }}
17+
username: ${{ secrets.USERNAME }}
18+
port: ${{ secrets.PORT }}
19+
key: ${{ secrets.SSHKEY }}
1920
source: "."
20-
target: "/var/www/mywebsite"
21+
target: "/root/asu-soda-newsite"
2122

22-
- name: Executing remote command
23+
- name: Executing remote deployment script
2324
uses: appleboy/ssh-action@master
2425
with:
2526
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

Comments
 (0)