From 9c9f2df80a6170fdb372d57d501e181bfc56524e Mon Sep 17 00:00:00 2001 From: Joey Hafner Date: Fri, 25 Feb 2022 21:30:41 +0000 Subject: [PATCH] Enable server-deploy --- homelab/.gitlab-ci.yml | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/homelab/.gitlab-ci.yml b/homelab/.gitlab-ci.yml index 973de0f5..35401ecf 100644 --- a/homelab/.gitlab-ci.yml +++ b/homelab/.gitlab-ci.yml @@ -12,20 +12,12 @@ before_script: - mkdir -p ~/.ssh - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' -do-nothing: +server-deploy: stage: deploy when: always + rules: + - changes: + - server/ + when: manual script: - - echo "Nothing'd successfully!" - -#server-deploy: -# stage: deploy -# when: always -# rules: -# - changes: -# - server/ -# when: manual -# script: -# - ssh joey@joey-server "cd /home/joey && git archive --remote=ssh://git@gitlab.jafner.net:2229/Jafner/homelab.git main server/ | tar xvf -" -# - ssh joey@joey-server "cp -r server/config/* ./docker_config/" -# - ssh joey@joey-server "rm -rf server/" + - ssh joey@joey-server "cd /home/joey/homelab && git pull"