refactor(ci): source script instead of running it separately

This commit is contained in:
parent 95be1dd7c9
commit c28b92f2d7
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C

@ -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