Skip to content

Commit e37d1ff

Browse files
committed
Use correct host
1 parent dcfb090 commit e37d1ff

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/cd.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,13 @@ jobs:
6464
target_path: "~/staging.mapdb.cncnet.org"
6565
compose_file: "docker-compose.prod.yml"
6666
nginx_conf: "docker/nginx.prod.conf"
67+
host: ${{ secrets.STAGING_SSH_HOST }}
6768
- environment: production
6869
branch: main
69-
target_path: "~/new.mapdb.cncnet.org"
70+
target_path: "~/mapdb.cncnet.org"
7071
compose_file: "docker-compose.prod.yml"
7172
nginx_conf: "docker/nginx.prod.conf"
73+
host: ${{ secrets.PROD_SSH_HOST }}
7274

7375
steps:
7476
- name: "Exit if not matching branch"
@@ -81,7 +83,7 @@ jobs:
8183
- name: Copy docker-compose and nginx config over ssh
8284
uses: appleboy/[email protected]
8385
with:
84-
host: ${{ secrets.SSH_HOST }}
86+
host: ${{ matrix.host }}
8587
username: ${{ secrets.SSH_USER }}
8688
key: ${{ secrets.SSH_PRIVATE_KEY }}
8789
source: "${{ matrix.compose_file }},${{ matrix.nginx_conf }}"
@@ -90,7 +92,7 @@ jobs:
9092
- name: SSH into server and deploy
9193
uses: appleboy/[email protected]
9294
with:
93-
host: ${{ secrets.SSH_HOST }}
95+
host: ${{ matrix.host }}
9496
username: ${{ secrets.SSH_USER }}
9597
key: ${{ secrets.SSH_PRIVATE_KEY }}
9698
script: |

0 commit comments

Comments
 (0)