From 928baa83e47a11d765493af38307d247148b0a2e Mon Sep 17 00:00:00 2001 From: Hans-Peter Oeri Date: Thu, 25 Oct 2018 13:40:10 +0200 Subject: autodeploy --- .gitlab-ci.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..022ba59 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,28 @@ +image: vorakl/alpine-pelican + +stages: + - build + - deploy + +stage_build: + stage: build + artifacts: + paths: + - output/ + script: + - pelican -v + +stage_deploy: + stage: deploy + only: + - master + dependencies: + - stage_build + script: + - apk update + - apk add rsync openssh + - mkdir -p ~/.ssh + - eval $(ssh-agent -s) + - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' + - ssh-add <(echo "$DEPLOY_KEY") + - rsync -Pvr output/ "$DEPLOY_TARGET" -- cgit v1.2.3