Skip to content

Commit d2bc525

Browse files
authored
Create client-deploy-app.yml
1 parent 10a13d9 commit d2bc525

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Transfer App Directory via using scp command on Push or Merge to Server
2+
3+
on:
4+
push:
5+
branches:
6+
- '.client/release/*'
7+
pull_request:
8+
types: [closed]
9+
branches:
10+
- '.client/release/*'
11+
12+
jobs:
13+
transfer-app:
14+
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.merged == true)
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v2
19+
- name: Set up SSH
20+
uses: webfactory/ssh-agent@v0.5.3
21+
with:
22+
ssh-private-key: ${{ secrets.DEPLOY_SSH_KEY }}
23+
- name: Transfer app directory to the server
24+
run: |
25+
scp -r app root@223.130.130.221:/var/www/html/

0 commit comments

Comments
 (0)