style(ci): remove commented-out script lines

This commit is contained in:
parent 08a4bc9f2c
commit 5baa00bbb4
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C

@ -21,11 +21,7 @@ build_stage:
- .output/ - .output/
- .nuxt/ - .nuxt/
# restrict to specific branch # define the deploy stages
# only:
# - master
# define the deploy stage
deploy_staging: deploy_staging:
stage: deploy stage: deploy
resource_group: staging resource_group: staging
@ -35,24 +31,15 @@ deploy_staging:
name: staging name: staging
url: https://next.rockfic.com url: https://next.rockfic.com
image: ubuntu:latest image: ubuntu:latest
# - apt-get update && apt-get install --yes --no-install-recommends rsync git openssh-client curl sshpass
# - eval $(ssh-agent -s)
# - chmod 600 ${SSH_DEPLOY_KEY}
# - ssh-add ${SSH_DEPLOY_KEY}
# - mkdir -p ~/.ssh
# - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
before_script: before_script:
- ". ${CI_PROJECT_DIR}/.more-ci/deploy-pre.sh ${SSH_DEPLOY_KEY}" - ". ${CI_PROJECT_DIR}/.more-ci/deploy-pre.sh ${SSH_DEPLOY_KEY}"
script: script:
# - "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/
- scp ${ENV_FILE} rockfic@${DEPLOY_SERVER}:rockfic-staging/.env - scp ${ENV_FILE} rockfic@${DEPLOY_SERVER}:rockfic-staging/.env
#- rsync --archive --delete ${CI_PROJECT_DIR}/cnf/ ${DEPLOY_USER}@${DEPLOY_SERVER}:~/cnf/
# restart Node.js and reload nginx configuration
- sshpass -p "${OLDROOTPWD}" ssh root@rockfic.com '~/cp.sh' - sshpass -p "${OLDROOTPWD}" ssh root@rockfic.com '~/cp.sh'
- ssh rockfic@${DEPLOY_SERVER} "~/stage.sh" ${DB_NAME} - ssh rockfic@${DEPLOY_SERVER} "~/stage.sh" ${DB_NAME}
- ssh rockfic@${DEPLOY_SERVER} node "~/rockfic-staging/.output/server/index.mjs" \&\>/dev/null \& disown \%1 # restart Node.js and reload nginx configuration
- ssh rockfic@${DEPLOY_SERVER} 'node "~/rockfic-staging/.output/server/index.mjs" &>/dev/null & disown %1'
- ssh rockfic@${DEPLOY_SERVER} sudo systemctl reload apache2 - ssh rockfic@${DEPLOY_SERVER} sudo systemctl reload apache2
except: except:
- tags - tags
@ -70,9 +57,8 @@ deploy_production:
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
#- rsync --archive --delete ${CI_PROJECT_DIR}/cnf/ ${DEPLOY_USER}@${DEPLOY_SERVER}:~/cnf/
- sed -Ei "s,(hasMigrated = )false,\1true," /home/@rockfic/lib/dbconfig.ts - sed -Ei "s,(hasMigrated = )false,\1true," /home/@rockfic/lib/dbconfig.ts
- ssh root@${DEPLOY_SERVER} node "/home/@rockfic/.output/server/index.mjs" \&\>/dev/null \& disown \%1 - ssh root@${DEPLOY_SERVER} 'node "/home/@rockfic/.output/server/index.mjs" &>/dev/null & disown %1'
- ssh root@${DEPLOY_SERVER} sudo systemctl reload apache2 - ssh root@${DEPLOY_SERVER} sudo systemctl reload apache2
only: only:
- tags - tags