@@ -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"
8383 - name : Copy docker-compose and nginx config over ssh
84848585 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 }}"
9292 - name : SSH into server and deploy
93939494 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