Updating the deployement if it already exists

1 job for master in 9 seconds (queued for 7 seconds)
Status Job ID Name Coverage
  Install
failed #5
piphone ssh
job install

00:00:09

 
Name Stage Failure
failed
job install Install There is an unknown failure, please try again
$ which git || (apt-get update -yq && apt-get install git -yqq)
/usr/bin/git
$ which virtualenv || (apt-get update -yq && apt-get install python3-virtualenv -yqq)
/usr/bin/virtualenv
$ cd /srv/piphone/
$ if [[ -d $CI_PROJECT_NAME ]]; then cd $CI_PROJECT_NAME; git pull origin master; else git clone $CI_BUILD_REPO $CI_PROJECT_NAME; cd $CI_PROJECT_NAME; fi;
fatal: le chemin de destination 'sip-backend' existe déjà et n'est pas un répertoire vide.

ERROR: Build failed: Process exited with: 1. Reason was: ()