image: ariejan/dockerized-hugo:latest test: script: # Compile - hugo # Compress CSS - yui-compressor public/css/style.css -o public/css/style-min.css - mv -f public/css/style-min.css public/css/style.css # Mogrify thumbnails - mkdir -p public/img/thumbs - cd public/img - mogrify -format png -path thumbs -thumbnail 724 *.png - mogrify -format jpg -path thumbs -thumbnail 724 *.jpg except: - master pages: before_script: # Setup SSH keys - mkdir -p ~/.ssh # Setup SSH - echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - cat ~/.ssh/id_rsa - ssh-keyscan -H 'mail.devroom.io' >> ~/.ssh/known_hosts - rsync --version - hugo version - ssh -vv -i ~/.ssh/id_rsa ariejan@mail.devroom.io exit; echo $? script: # Compile - hugo # Compress CSS - yui-compressor public/css/style.css -o public/css/style-min.css - mv -f public/css/style-min.css public/css/style.css # Mogrify thumbnails - mkdir -p public/img/thumbs - cd public/img - mogrify -format png -path thumbs -thumbnail 724 *.png - mogrify -format jpg -path thumbs -thumbnail 724 *.jpg # Deploy - cd "$CI_PROJECT_DIR" - rsync -az4 -e 'ssh -i ~/.ssh/id_rsa -l ariejan' --stats --delete-after public/* mail.devroom.io:/home/ariejan/www/devroom.io/ artifacts: paths: - public environment: name: production url: https://www.devroom.io only: - master