image: ariejan/dockerized-hugo:0.26 test: script: - hugo except: - master pages: before_script: # Setup SSH keys - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' - eval $(ssh-agent -s) - ssh-add <(echo "$SSH_PRIVATE_KEY") - mkdir -p ~/.ssh - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' script: # Compile - hugo # Compress CSS - yui-compressor public/css/outerspace.css -o public/css/outerspace-min.css - mv -f public/css/outerspace-min.css public/css/outerspace.css # Deploy - rsync -az4 --stats --delete-after public/* -e "ssh -i ~/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" ariejan@mail.devroom.io:/home/ariejan/www/devroom.io/ artifacts: paths: - public environment: name: production url: https://www.devroom.io only: - master