From 1c3286eca34c67d5411bcedb666cb2aa62c9ae9e Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 8 Jul 2019 11:53:46 +0200 Subject: [PATCH] gitlab-ci: only run deploy on changes in krebs --- .gitlab-ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bd0b32edc..fb273c932 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,6 +36,12 @@ wolf deployment: - ssh-keyscan -H 'wolf.shack' >> ~/.ssh/known_hosts # TODO, hostname wolf cannot be resolved - $(nix-build krebs/krops.nix --no-out-link --argstr name wolf --argstr target wolf.shack -A deploy) + only: + changes: + - .gitlab-ci.yml + - krebs/**/* + - lib/**/* + - .gitmodules nur-packages makefu: stage: deploy script: @@ -44,5 +50,8 @@ nur-packages makefu: - git remote add deploy git@github.com:makefu/nur-packages.git || git remote set-url deploy git@github.com:makefu/nur-packages.git - GIT_SSH_COMMAND="ssh -i ~/.ssh/github_deploy.key" git push --force deploy HEAD:master - curl -XPOST http://nur-update.herokuapp.com/update?repo=makefu + only: + changes: + - makefu/**/* after_script: - rm -rf .ssh/