-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (40 loc) · 1.19 KB
/
cd.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
name: cd
on:
workflow_run:
workflows: [ "ci" ]
paths:
- 'main-server/**'
- 'logging-server/**'
types:
- completed
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: dorny/[email protected]
id: changes
with:
filters: |
main:
- 'main-server/**'
logging:
- 'logging-server/**'
- name: deploy main-server
# if: steps.changes.outputs.main == 'true'
uses: appleboy/[email protected]
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
password: ${{ secrets.SERVER_PASSWORD }}
port: ${{ secrets.SERVER_SSH_PORT }}
script: sh ~/script/deploy-main-server.sh
- name: deploy logging-server
# if: steps.changes.outputs.logging == 'true'
uses: appleboy/[email protected]
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
password: ${{ secrets.SERVER_PASSWORD }}
port: ${{ secrets.SERVER_SSH_PORT }}
script: sh ~/script/deploy-logging-server.sh