Update .gitlab-ci.yml file

This commit is contained in:
Alexander Hosking 2022-04-20 14:18:01 +00:00
parent e3d6e37fde
commit 51acf09263

View File

@ -38,6 +38,12 @@ deploy-period:
stage: deploy stage: deploy
environment: production environment: production
image: debian:buster image: debian:buster
before_script:
- 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
script: script:
- ssh ahosking@192.168.1.19 "cd /home/ahosking/period && git pull origin master && exit" - ssh ahosking@192.168.1.19 "cd /home/ahosking/period && git pull origin master && exit"
only: only: