stages: - deploy deploy-job: stage: deploy image: ubuntu:latest before_script: - apt-get update - apt-get install -y rsync openssh-client hugo git sshpass script: - git clone https://code.be4.pw/fzorb/website - cd website - git submodule foreach --recursive git reset --hard && git submodule init && git submodule update --recursive - hugo - ssh-keyscan -p 69 fzorb.xyz >> ~/.ssh/known_hosts - sshpass -p "$PASSWD" rsync -avzh website/public/ -e 'ssh -p 69' git@fzorb.xyz:/var/www/fzorb.xyz - sshpass -p "$PASSWD" ssh -p 69 git@fzorb.xyz "chmod 777 -R /var/www/fzorb.xyz" only: - main