image: ruby:2.4
stages:
- deploy
deploy:
stage: deploy
before_script:
- apt-get update -y
- apt-get -y install rsync
- gem install jekyll -v 3.6.0
- eval $(ssh-agent -s)
script:
- jekyll build -d public
- ssh-add <(echo "$SSH_PRIVATE_KEY")
- rsync -rvz --delete -e 'ssh -o StrictHostKeyChecking=no' ./public/ "$SERVER_USER"@autonomic.zone:/var/www/autonomic.zone/html/
artifacts:
paths:
- public
only:
- master