Skip to content
Snippets Groups Projects

feature(deploy): port

Merged Grzegorz Rola requested to merge feature/deploy-port into main
1 file
+ 3
1
Compare changes
  • Side-by-side
  • Inline
+ 3
1
@@ -54,9 +54,11 @@ stages:
@@ -54,9 +54,11 @@ stages:
- if [ "$DEPLOY_HOST" ] == "" ]; then echo "DEPLOY_HOST is empty" ; exit 1; fi
- if [ "$DEPLOY_HOST" ] == "" ]; then echo "DEPLOY_HOST is empty" ; exit 1; fi
- if [ "$DEPLOY_USER" ] == "" ]; then echo "DEPLOY_USER is empty" ; exit 1; fi
- if [ "$DEPLOY_USER" ] == "" ]; then echo "DEPLOY_USER is empty" ; exit 1; fi
- if [ "$DEPLOY_DIR" ] == "" ]; then echo "DEPLOY_DIR is empty" ; exit 1; fi
- if [ "$DEPLOY_DIR" ] == "" ]; then echo "DEPLOY_DIR is empty" ; exit 1; fi
 
- if [ "$DEPLOY_PORT" ] == "" ]; then echo "DEPLOY_PORT is empty" ; exit 1; fi
- ls -al
- ls -al
- ssh-keyscan -H -p $DEPLOY_PORT $DEPLOY_HOST >> ~/.ssh/known_hosts
- ssh-keyscan -H -p $DEPLOY_PORT $DEPLOY_HOST >> ~/.ssh/known_hosts
- rsync -v --delete -rlDe 'ssh -p $DEPLOY_PORT -v -i ~/.ssh/id_rsa_demo_fs' --exclude-from=.distignore ${CI_PROJECT_DIR}/web/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_DIR
- export RSYNC_RSH="ssh -p $DEPLOY_PORT -v -i ~/.ssh/id_rsa_demo_fs"
 
- rsync -v --delete -rlDe $RSYNC_RSH --exclude-from=.distignore ${CI_PROJECT_DIR}/web/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_DIR
- ssh -p $DEPLOY_PORT -i ~/.ssh/id_rsa_demo_fs $DEPLOY_USER@$DEPLOY_HOST "cd $DEPLOY_DIR && mv frontend/dist/assets/ public/ && mv frontend/dist/index.html public/index.html && php82 bin/console doctrine:migrations:migrate --no-interaction && php82 bin/console cache:clear && $RUN_AFTER_DEPLOY"
- ssh -p $DEPLOY_PORT -i ~/.ssh/id_rsa_demo_fs $DEPLOY_USER@$DEPLOY_HOST "cd $DEPLOY_DIR && mv frontend/dist/assets/ public/ && mv frontend/dist/index.html public/index.html && php82 bin/console doctrine:migrations:migrate --no-interaction && php82 bin/console cache:clear && $RUN_AFTER_DEPLOY"
after_script:
after_script:
- $DEPLOY_AFTER_SCRIPT
- $DEPLOY_AFTER_SCRIPT
Loading