diff --git a/gitlab-ci.yml b/gitlab-ci.yml index 2b6a74d178a4672e7f379a09835e13e792db6b9e..946bf0a308a70b149f651c5a50dbac65084944b7 100644 --- a/gitlab-ci.yml +++ b/gitlab-ci.yml @@ -18,9 +18,9 @@ variables: stages: - build + - tests - deploy - purge_cache - - tests .template: &prepare-assets tags: @@ -58,8 +58,9 @@ stages: - ls -al - ssh-keyscan -H -p $DEPLOY_PORT $DEPLOY_HOST >> ~/.ssh/known_hosts - 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 && php bin/console doctrine:migrations:migrate --no-interaction && php bin/console cache:clear && $RUN_AFTER_DEPLOY" + - rsync -v --delete -rlDe "$RSYNC_RSH" --exclude-from=web/backend/.distignore ${CI_PROJECT_DIR}/web/backend/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_DIR + - rsync -v --delete -rlDe "$RSYNC_RSH" --exclude-from=web/frontend/.distignore ${CI_PROJECT_DIR}/web/frontend/dist/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_DIR/public + - ssh -p $DEPLOY_PORT -i ~/.ssh/id_rsa_demo_fs $DEPLOY_USER@$DEPLOY_HOST "cd $DEPLOY_DIR && php bin/console doctrine:migrations:migrate --no-interaction && php bin/console cache:clear && $RUN_AFTER_DEPLOY" after_script: - $DEPLOY_AFTER_SCRIPT @@ -89,7 +90,7 @@ composer install: artifacts: name: "vendor" paths: - - web/vendor + - web/backend/vendor image: composer:latest tags: - vendor @@ -97,7 +98,7 @@ composer install: interruptible: true script: - php -v - - cd web + - cd web/backend - composer config gitlab-token.gitlab.wpdesk.dev gitlab-ci-token ${CI_JOB_TOKEN} - composer install --optimize-autoloader --no-dev --no-scripts