From c28b92f2d7a3ac4697fe102e5a3c4522df6e59a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 28 Dec 2023 18:19:32 -0500 Subject: [PATCH] refactor(ci): source script instead of running it separately --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d41f5ef..e611e19 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -39,7 +39,7 @@ deploy_staging: # - mkdir -p ~/.ssh # - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' before_script: - - "bash ${CI_PROJECT_DIR}/.more-ci/deploy-pre.sh ${SSH_DEPLOY_KEY}" + - ". ${CI_PROJECT_DIR}/.more-ci/deploy-pre.sh ${SSH_DEPLOY_KEY}" script: # - "cat ${ENV_FILE} | ssh rockfic@${DEPLOY_SERVER} 'cat > ~/rockfic-staging/.env'" - rsync --archive --del ${CI_PROJECT_DIR}/ rockfic@${DEPLOY_SERVER}:~/rockfic-staging/ @@ -60,7 +60,7 @@ deploy_production: url: https://www.rockfic.com image: ubuntu:latest before_script: - - "bash ${CI_PROJECT_DIR}/.more-ci/deploy-pre.sh ${SSH_DEPLOY_KEY}" + - ". ${CI_PROJECT_DIR}/.more-ci/deploy-pre.sh ${SSH_DEPLOY_KEY}" script: - rsync --archive --del ${CI_PROJECT_DIR}/ root@${DEPLOY_SERVER}:/home/@rockfic/ - scp ${ENV_FILE} root@${DEPLOY_SERVER}:/home/@rockfic/.env