period3.xyz/makefile

25 lines
528 B
Makefile

.DEFAULT_GOAL := $(SITE)
SITE = period3.xyz
HOST = pluto
HOST_DIR = $(HOST):~
CONTENT = content/
DEPLOY = deploy.sh
#
$(SITE): $(CONTENT)
[ -d $(SITE) ] || rsync -rP $(CONTENT) $(SITE)
# to deploy the site we copy a deploy script and the site
# contents over to the remote host, then run the deploy script
# which is used to place the site files in the hosted root folder
deploy: $(SITE)
rsync -P $(DEPLOY) $(HOST_DIR)
rsync -rP $(SITE) $(HOST_DIR)
ssh $(HOST) "bash -s" < $(DEPLOY)
clean: $(SITE)
rm -r $(SITE)