Skip to content

Commit 2671dc0

Browse files
committed
Fix silly mistake with CD and secrets
1 parent daf537a commit 2671dc0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/cd.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +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 }}
67+
host-s-name: "STAGING_SSH_HOST"
6868
- environment: production
6969
branch: main
7070
target_path: "~/mapdb.cncnet.org"
7171
compose_file: "docker-compose.prod.yml"
7272
nginx_conf: "docker/nginx.prod.conf"
73-
host: ${{ secrets.PROD_SSH_HOST }}
73+
host-s-name: "PROD_SSH_HOST"
7474

7575
steps:
7676
- name: "Exit if not matching branch"
@@ -83,7 +83,7 @@ jobs:
8383
- name: Copy docker-compose and nginx config over ssh
8484
uses: appleboy/[email protected]
8585
with:
86-
host: ${{ matrix.host }}
86+
host: ${{ secrets[matrix.host-s-name] }}
8787
username: ${{ secrets.SSH_USER }}
8888
key: ${{ secrets.SSH_PRIVATE_KEY }}
8989
source: "${{ matrix.compose_file }},${{ matrix.nginx_conf }}"
@@ -92,7 +92,7 @@ jobs:
9292
- name: SSH into server and deploy
9393
uses: appleboy/[email protected]
9494
with:
95-
host: ${{ matrix.host }}
95+
host: ${{ secrets[matrix.host-s-name] }}
9696
username: ${{ secrets.SSH_USER }}
9797
key: ${{ secrets.SSH_PRIVATE_KEY }}
9898
script: |

0 commit comments

Comments
 (0)