diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5bdf18f42ba0d9c7612b6c0fc10474c6d4d55703..a48db09809a3fced6772cd8ba0edfdedec37a400 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,7 +9,13 @@ include: .deploy:nextcloud-app-by-checkout: script: - - ssh $SSH_USER@$DEPLOYMENT_HOST "git clone --depth 1 $CI_REPOSITORY_URL --branch $CI_COMMIT_REF_NAME --single-branch /tmp/${CI_JOB_ID}/${APP_NAME} && sudo rsync -avzh --chown www-data:www-data --delete --exclude '.git*' /tmp/${CI_JOB_ID}/${eCloud} ${DEPLOYMENT_PATH}/html/themes/ && rm -rf /tmp/${CI_JOB_ID} && docker exec -u www-data $CONTAINER_NAME /usr/local/bin/php /var/www/html/occ maintenance:theme:update" - - - + # print var to confirm + - echo "Deploying $APP_NAME to $CI_ENVIRONMENT_NAME ($DEPLOYMENT_HOST)" + # clone repo to /tmp + - | + ssh $SSH_USER@$DEPLOYMENT_HOST /bin/bash -s << EOT + git clone --depth 1 $CI_REPOSITORY_URL --branch $CI_COMMIT_REF_NAME --single-branch /tmp/${CI_JOB_ID}/${APP_NAME} + sudo rsync -avzh --chown www-data:www-data --delete --exclude '.git*' /tmp/${CI_JOB_ID}/${APP_NAME} ${DEPLOYMENT_PATH}/html/themes/${APP_NAME} + docker exec -u www-data $CONTAINER_NAME /usr/local/bin/php /var/www/html/occ maintenance:theme:update + EOT + - echo "SUCCESS" > .job_status