refactor(ci): quote bash script invocation

to allow the variables to be expanded properly
This commit is contained in:
parent 18f11f7ca7
commit 95be1dd7c9
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C

@ -39,7 +39,7 @@ deploy_staging:
# - mkdir -p ~/.ssh # - mkdir -p ~/.ssh
# - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' # - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
before_script: before_script:
- bash ${CI_PROJECT_DIR}/.more-ci/deploy-pre.sh ${SSH_DEPLOY_KEY} - "bash ${CI_PROJECT_DIR}/.more-ci/deploy-pre.sh ${SSH_DEPLOY_KEY}"
script: script:
# - "cat ${ENV_FILE} | ssh rockfic@${DEPLOY_SERVER} 'cat > ~/rockfic-staging/.env'" # - "cat ${ENV_FILE} | ssh rockfic@${DEPLOY_SERVER} 'cat > ~/rockfic-staging/.env'"
- rsync --archive --del ${CI_PROJECT_DIR}/ rockfic@${DEPLOY_SERVER}:~/rockfic-staging/ - rsync --archive --del ${CI_PROJECT_DIR}/ rockfic@${DEPLOY_SERVER}:~/rockfic-staging/
@ -60,7 +60,7 @@ deploy_production:
url: https://www.rockfic.com url: https://www.rockfic.com
image: ubuntu:latest image: ubuntu:latest
before_script: before_script:
- bash ${CI_PROJECT_DIR}/.more-ci/deploy-pre.sh ${SSH_DEPLOY_KEY} - "bash ${CI_PROJECT_DIR}/.more-ci/deploy-pre.sh ${SSH_DEPLOY_KEY}"
script: script:
- rsync --archive --del ${CI_PROJECT_DIR}/ root@${DEPLOY_SERVER}:/home/@rockfic/ - rsync --archive --del ${CI_PROJECT_DIR}/ root@${DEPLOY_SERVER}:/home/@rockfic/
- scp ${ENV_FILE} root@${DEPLOY_SERVER}:/home/@rockfic/.env - scp ${ENV_FILE} root@${DEPLOY_SERVER}:/home/@rockfic/.env