aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile10
-rwxr-xr-xbin/ssg1
2 files changed, 8 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index def4abd..fcd376c 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,8 @@ BIN := ./bin
SRC := ./src
OUT := ./out
TMP := ./tmp
+REMOTE := root@dc0
+REMOTE_DIR := /var/www/htdocs/rgoncalves.se
BASE_URL = https://rgoncalves.se
.PHONY: all \
@@ -12,11 +14,15 @@ BASE_URL = https://rgoncalves.se
all: clean website
+local: clean
+ BASE_URL=$$PWD/$(OUT) $(BIN)/ssg
+
website: clean
BASE_URL=$(BASE_URL) $(BIN)/ssg
-local: clean
- BASE_URL=$$PWD/$(OUT) $(BIN)/ssg
+deploy: website
+ rsync -e ssh -avz --delete $(OUT)/ $(REMOTE):$(REMOTE_DIR)
+ ssh $(REMOTE) chown -R www:www $(REMOTE_DIR)
clean:
- rm -r $(OUT) $(TMP)/*
diff --git a/bin/ssg b/bin/ssg
index f47f819..b96e01f 100755
--- a/bin/ssg
+++ b/bin/ssg
@@ -44,7 +44,6 @@ _convert_urls() {
sed -i "s@<img[^>]* src=\"[/^\"]*/@<img src=\"$2/@g" "${1}"
}
-
main() {
local file
remember that computers suck.