fix(ci): copy env file properly
This commit is contained in:
parent
2b5447fb1b
commit
87ee2cdd1d
@ -42,7 +42,7 @@ deploy_stage:
|
|||||||
# deploy application and server configuration
|
# deploy application and server configuration
|
||||||
# - "cat ${ENV_FILE} | ssh rockfic@${DEPLOY_SERVER} 'cat > ~/rockfic-staging/.env'"
|
# - "cat ${ENV_FILE} | ssh rockfic@${DEPLOY_SERVER} 'cat > ~/rockfic-staging/.env'"
|
||||||
- rsync --archive --delete ${CI_PROJECT_DIR}/ rockfic@${DEPLOY_SERVER}:~/rockfic-staging/
|
- 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/
|
#- rsync --archive --delete ${CI_PROJECT_DIR}/cnf/ ${DEPLOY_USER}@${DEPLOY_SERVER}:~/cnf/
|
||||||
|
|
||||||
# restart Node.js and reload nginx configuration
|
# 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} "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} 'mongorestore --drop -d rockfic_old dump/rockfic'
|
||||||
- ssh rockfic@${DEPLOY_SERVER} 'cd migrator && bun install && bun run ./index.ts'
|
- 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
|
- ssh rockfic@${DEPLOY_SERVER} systemctl reload apache2
|
||||||
environment:
|
environment:
|
||||||
name: staging
|
name: staging
|
||||||
|
Loading…
Reference in New Issue
Block a user