Browse Source

Adding blog deployment

master
Drew Short 6 years ago
parent
commit
b8f251c367
  1. 48
      .gitlab-ci.yml

48
.gitlab-ci.yml

@ -1,16 +1,38 @@
stages:
- build
- build
- deploy
site-build:
image: jojomi/hugo
stage: build
script:
- hugo
only:
- master
artifacts:
paths:
- public
expire_in: 1 week
tags:
- docker
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
Loading…
Cancel
Save