refactor(ci): source script instead of running it separately
This commit is contained in:
parent
95be1dd7c9
commit
c28b92f2d7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user