-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (43 loc) · 1.3 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
name: Deploy to prod env
on:
workflow_run:
workflows:
- Ktlint
types:
- completed
jobs:
deploy:
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main' }}
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
with:
token: ${{ secrets.PRIVATE_TOKEN }}
submodules: true
- name: Print Hello World
run: echo "HELLO, WORLD!"
# - name: create remote directory
# uses: appleboy/ssh-action@master
# with:
# host: ${{ secrets.SSH_KNOWN_HOSTS }}
# username: ubuntu
# key: ${{ secrets.SSH_PEM_KEY }}
# script: mkdir -p /home/ubuntu/backend
#
# - name: copy source via ssh key
# uses: burnett01/[email protected]
# with:
# switches: -avzr --delete
# remote_path: /home/ubuntu/backend
# remote_host: ${{ secrets.SSH_KNOWN_HOSTS }}
# remote_user: ubuntu
# remote_key: ${{ secrets.SSH_PEM_KEY }}
#
# - name: trigger script
# uses: appleboy/ssh-action@master
# with:
# host: ${{ secrets.SSH_KNOWN_HOSTS }}
# username: ubuntu
# key: ${{ secrets.SSH_PEM_KEY }}
# script: sh /home/ubuntu/backend/deploy.sh