You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

38 lines
809 B

stages:
- build
- deploy
site-build:
image: jojomi/hugo
stage: build
script:
- hugo
only:
- master
artifacts:
paths:
- public
expire_in: 1 week
tags:
- docker
site-deploy:
image: panubo/sshd:latest
stage: deploy
variables:
DEPLOY_USER: "deploy"
DEPLOY_HOST: "162.243.78.94"
DEPLOY_PORT: "9140"
TARGET_DIRECTORY: "~/blog.nulloctet.com"
script:
- echo "Deployment To Production Starting..."
- eval `ssh-agent -s`
- ssh-add <(echo "$SSH_DEPLOY_KEY")
- rsync -avz --delete-delay -e "ssh -p $DEPLOY_PORT -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --progress public/* $DEPLOY_USER@$DEPLOY_HOST:$TARGET_DIRECTORY
only:
- master
dependencies:
- site-build
tags:
- docker
environment: production