From 8884c99b7aea2306b217af2a4e5bcaddad178fd6 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 20 May 2022 11:28:24 +0200 Subject: workflows/build: rsync PDF to server --- Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 159f1fb..214a8b7 100644 --- a/Makefile +++ b/Makefile @@ -49,6 +49,18 @@ $(pdf): $(name).tex img/face2020_warm.jpg | $(name)/ view: xdg-open '$(call escape,$(pdf))' &> /dev/null +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' '$(call escape,$(name)/)' '$(call escape,$(REMOTE_USER)@$(REMOTE_HOST):$(REMOTE_DIR)/)' --delete + .PHONY: clean clean: find '$(call escape,$(name))' '!' -name '$(call escape,$(name).pdf)' -type f -delete -- cgit v1.2.3