fix(ci): move bash invocation to before_Script
This commit is contained in:
parent
d6f146c481
commit
2ee0bb0e0a
@ -38,9 +38,9 @@ deploy_staging:
|
||||
# - ssh-add ${SSH_DEPLOY_KEY}
|
||||
# - mkdir -p ~/.ssh
|
||||
# - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
|
||||
|
||||
script:
|
||||
before_script:
|
||||
- bash ${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/
|
||||
- scp ${ENV_FILE} rockfic@${DEPLOY_SERVER}:rockfic-staging/.env
|
||||
@ -59,13 +59,14 @@ deploy_production:
|
||||
name: production
|
||||
url: https://www.rockfic.com
|
||||
image: ubuntu:latest
|
||||
script:
|
||||
before_script:
|
||||
- bash ${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
|
||||
#- rsync --archive --delete ${CI_PROJECT_DIR}/cnf/ ${DEPLOY_USER}@${DEPLOY_SERVER}:~/cnf/
|
||||
- ssh root@${DEPLOY_SERVER} node "/home/@rockfic/.output/server/index.mjs" \&\>/dev/null \& disown \%1
|
||||
- ssh rockfic@${DEPLOY_SERVER} sudo systemctl reload apache2
|
||||
- ssh root@${DEPLOY_SERVER} sudo systemctl reload apache2
|
||||
only:
|
||||
- tags
|
||||
# restrict to specific branch
|
||||
|
Loading…
Reference in New Issue
Block a user