diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f13a5f15f2be3537ae7fac214180403b5b083a3f..05e85486902cc8f5ce0f83bdb19266478081af7c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,13 +45,9 @@ deploy to stage: # WARNING: use only in docker container, if you use it with shell you will overwrite your user's ssh config - mkdir -p ~/.ssh - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config - - adduser nginx + - adduser --quiet --no-create-home nginx script: - #- ls site/ - #- echo $CI_BUILD_REF_NAME - #- ssh root@"$SSH_HOST_STAGE" uptime - - chown nginx site -R - - ls + - chown nginx:nginx site -R - rsync -av --delete site/ root@"$SSH_HOST_STAGE":/srv/docs.it4i.cz/devel/$CI_BUILD_REF_NAME/ deploy to production: @@ -70,10 +66,9 @@ deploy to production: # WARNING: use only in docker container, if you use it with shell you will overwrite your user's ssh config - mkdir -p ~/.ssh - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config + - adduser --quiet --no-create-home nginx script: - #- ls site/ - #- echo $CI_BUILD_REF_NAME - #- ssh root@"$SSH_HOST_STAGE" uptime + - chown nginx:nginx site -R - rsync -av --delete site/ root@"$SSH_HOST_STAGE":/srv/docs.it4i.cz/site/ only: - master