From 87ee2cdd1d38335057dd90b2149736491cc674df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Tue, 26 Dec 2023 18:54:12 -0500 Subject: [PATCH] fix(ci): copy env file properly --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7dd55a9..3115255 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,7 +42,7 @@ deploy_stage: # deploy application and server configuration # - "cat ${ENV_FILE} | ssh rockfic@${DEPLOY_SERVER} 'cat > ~/rockfic-staging/.env'" - rsync --archive --delete ${CI_PROJECT_DIR}/ rockfic@${DEPLOY_SERVER}:~/rockfic-staging/ - - "scp ${ENV_FILE} rockfic@${DEPLOY_SERVER}:rockfic-staging/" + - 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 @@ -50,7 +50,7 @@ deploy_stage: - ssh rockfic@${DEPLOY_SERVER} "mongosh mongodb://localhost <(echo -e \"use rockfic_old\ndb.dropDatabase()\nuse ${DB_NAME}\ndb.dropDatabase()\")" - ssh rockfic@${DEPLOY_SERVER} 'mongorestore --drop -d rockfic_old dump/rockfic' - ssh rockfic@${DEPLOY_SERVER} 'cd migrator && bun install && bun run ./index.ts' - - ssh rockfic@${DEPLOY_SERVER} node run "~/rockfic-staging/.output/server/index.mjs" \&\>/dev/null \& disown \%1 + - ssh rockfic@${DEPLOY_SERVER} node "~/rockfic-staging/.output/server/index.mjs" \&\>/dev/null \& disown \%1 - ssh rockfic@${DEPLOY_SERVER} systemctl reload apache2 environment: name: staging