From 64f447bbe9a489f561d87c4f744f2ee4fb8b398e Mon Sep 17 00:00:00 2001 From: Andreas Neue Date: Mon, 4 Jul 2022 17:57:32 +0200 Subject: [PATCH] fixed pre-/post-deploy to run on remote machine --- Makefile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index fafcda8..dd990ce 100644 --- a/Makefile +++ b/Makefile @@ -27,15 +27,13 @@ post-deploy-swarm: post-deploy-docker pre-deploy-docker: @- echo "\n### running pre-deploy script" @- $(foreach host,$(DEPLOY_HOSTS), \ - cd $(DEPLOY_PATH)/$(DEPLOY_NAME); \ - sh pre-deploy; \ + ssh $(SSH_USER)@$(host) "cd $(DEPLOY_PATH)/$(DEPLOY_NAME); sh pre-deploy"; \ ) post-deploy-docker: @- echo "\n### running post-deploy script" @- $(foreach host,$(DEPLOY_HOSTS), \ - cd $(DEPLOY_PATH)/$(DEPLOY_NAME); \ - sh post-deploy; \ + ssh $(SSH_USER)@$(host) "cd $(DEPLOY_PATH)/$(DEPLOY_NAME); sh post-deploy"; \ ) upload: