From 41cf0bf907e128f08af099d0c75f023b4619d38b Mon Sep 17 00:00:00 2001
From: Carl Worth <cworth@cworth.org>
Date: Sun, 3 May 2020 11:01:26 -0700
Subject: [PATCH] Add a simple "make deploy" target

To simplify the deployment which I'd previously been doing manually.

This will deploy only the state of committed code.
---
 empires/Makefile | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 empires/Makefile

diff --git a/empires/Makefile b/empires/Makefile
new file mode 100644
index 0000000..f490fec
--- /dev/null
+++ b/empires/Makefile
@@ -0,0 +1,11 @@
+PUBLISH_HOST=cworth.org
+PUBLISH_DIR=/srv/families.cworth.org/www
+
+DO_NOT_PUBLISH="Makefile"
+
+deploy:
+	rm -rf .deploy-source
+	git clone . .deploy-source
+	rm -rf .deploy-source/.git
+	(cd .deploy-source; rm $(DO_NOT_PUBLISH); rsync -avz ./ --delete --delete-after $(PUBLISH_HOST):$(PUBLISH_DIR) )
+	rm -rf .deploy-source
-- 
2.45.2