From eea505cd68c9178388c6cc04f42aaac84fe02610 Mon Sep 17 00:00:00 2001
From: Volpeon <git@volpeon.ink>
Date: Wed, 30 Dec 2020 12:20:11 +0100
Subject: Configurable deploy target

---
 Makefile           |  3 +--
 scripts/deploy.sh  | 10 ++++++++++
 site.defaults.conf |  2 ++
 3 files changed, 13 insertions(+), 2 deletions(-)
 create mode 100755 scripts/deploy.sh

diff --git a/Makefile b/Makefile
index 861b8b6..a72a148 100644
--- a/Makefile
+++ b/Makefile
@@ -48,7 +48,6 @@ serve_only: build_only
 serve: watch serve_only
 
 deploy: build
-	@echo -e "\033[0;32m[DEPLOY  ]\033[0m volpeon.ink"
-	@rsync --progress --stats -avz --delete output/ vulpes@94.130.78.123:/srv/http/volpeon.ink/ 
+	@scripts/deploy.sh
 
 .PHONY: all clean build watch serve deploy
diff --git a/scripts/deploy.sh b/scripts/deploy.sh
new file mode 100755
index 0000000..129ddda
--- /dev/null
+++ b/scripts/deploy.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+source "site.defaults.conf"
+
+if [ -f "site.conf" ]; then
+    source "site.conf"
+fi
+
+echo -e "\033[0;32m[DEPLOY  ]\033[0m $DEPLOY_TARGET"
+rsync --progress --stats -avz --delete "$OUTPUT_DIR" "$DEPLOY_TARGET"
diff --git a/site.defaults.conf b/site.defaults.conf
index 1c44c50..b57abc1 100644
--- a/site.defaults.conf
+++ b/site.defaults.conf
@@ -1,5 +1,7 @@
 SITE="https://volpeon.ink/"
 
+DEPLOY_TARGET="vulpes@94.130.78.123:/srv/http/volpeon.ink/"
+
 CONTENT_DIR="content/"
 ASSETS_DIR="assets/"
 FILTERS_DIR="filters/"
-- 
cgit v1.2.3-70-g09d2