From 0c9b4a2aa17e60f453019bed3ffcc87e459a7c6b Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 16 May 2022 22:21:49 +0200 Subject: workflows/jekyll: rsync _site/ to server --- Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index bc21bd0..99c1266 100644 --- a/Makefile +++ b/Makefile @@ -63,3 +63,15 @@ bundle: assets/js/bundle.js assets/js/bundle.js: package-lock.json npm exec -- browserify --require ip-address --outfile '$(call escape,$@)' + +REMOTE_USER ?= who +REMOTE_HOST ?= where +REMOTE_DIR ?= /path/to/dir + +$(eval $(call noexpand,REMOTE_USER)) +$(eval $(call noexpand,REMOTE_HOST)) +$(eval $(call noexpand,REMOTE_DIR)) + +.PHONY: deploy +deploy: + rsync -avh -e 'ssh -o StrictHostKeyChecking=no' _site/ '$(call escape,$(REMOTE_USER)@$(REMOTE_HOST):$(REMOTE_DIR)/)' --delete -- cgit v1.2.3