diff options
author | Romain Gonçalves <me@rgoncalves.se> | 2021-08-07 20:27:00 +0200 |
---|---|---|
committer | Romain Gonçalves <me@rgoncalves.se> | 2021-08-07 20:27:00 +0200 |
commit | 6ca04ed7d406781bb47dc826bea12f970cd4ebb8 (patch) | |
tree | 3262f454217dd802544ddb11aec890622fc54f9d | |
parent | 8b533032927840d35d31b124ec46ab2803f3fcf2 (diff) | |
download | rgoncalves.se-6ca04ed7d406781bb47dc826bea12f970cd4ebb8.tar.gz |
Makefile: Add deployment
-rw-r--r-- | Makefile | 10 | ||||
-rwxr-xr-x | bin/ssg | 1 |
2 files changed, 8 insertions, 3 deletions
@@ -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)/* @@ -44,7 +44,6 @@ _convert_urls() { sed -i "s@<img[^>]* src=\"[/^\"]*/@<img src=\"$2/@g" "${1}" } - main() { local file |