-
Notifications
You must be signed in to change notification settings - Fork 5
38 lines (37 loc) · 984 Bytes
/
cd.yaml
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
name: Deploy on server
on:
push:
branches:
- main
paths:
- 'backend/**'
- 'frontend/**'
- 'nginx/**'
jobs:
staging_deploy:
runs-on : ubuntu-latest
environment:
name: Staging
url: http://142.93.161.63
steps:
- name: executing remote ssh commands using ssh key On satging
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
key: ${{ secrets.PRIVATE_KEY }}
script: '/root/execute.sh'
production_deploy:
runs-on : ubuntu-latest
needs: staging_deploy
environment:
name: Production
url: http://164.92.243.105
steps:
- name: executing remote ssh commands using ssh key on production
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
key: ${{ secrets.PRIVATE_KEY }}
script: '/root/execute.sh'