From ee916a506bf9ec4de1e7e5a52a66318498243294 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sun, 8 Aug 2021 16:23:51 +0200 Subject: [PATCH] build: makefile: add deploy step --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 9ecbb22..2bf1634 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,11 @@ build-prod: serve: hugo server -D -F +deploy: + @if [ -n "$$KEY" ]; then eval "$$(ssh-agent)"; echo "$$KEY" | ssh-add -; fi + if [ -z "$$USERNAME" ] || [ -z "$$SSH_HOST" ] || [ -z "$$TARGET" ]; then exit 1; fi + rsync --progress -avz --delete public/ "$$USERNAME@$$SSH_HOST:$$TARGET" + .PHONY: clean clean: $(RM) -r public