summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: b3a8aa8bbb375675b61d8cba0bf48f1d1eb5fc01 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.POSIX:

REMOTE_HOST := root@rgoncalves.se
REMOTE_DIR := /var/www/htdocs/sousleciel.lol
OUTPUT_DIR := ./out
TEMPORARY_DIR := ./tmp
PATH := $(PATH):../ssg

SSG_WEBSITE_DOMAIN := sousleciel.lol
SSG_WEBSITE_TITLE := Sous le ciel
SSG_WEBSITE_DESCRIPTION := sous le ciel

.PHONY: all \
	site \
	clean

site: clean
	ssg
	# rssg

preview: site
	python3 -m http.server --directory $(OUTPUT_DIR) --bind 127.0.0.1

clean:
	- rm -r $(OUTPUT_DIR) $(TEMPORARY_DIR)

deploy: site
	find out -type f \( -iname "*.html" -o -iname "*.css" -o -iname "*.svg" \) -exec gzip -kf {} \;
	rsync -e ssh -avz --delete --exclude public --exclude private $(OUTPUT_DIR)/ $(REMOTE_HOST):$(REMOTE_DIR)
	ssh $(REMOTE_HOST) chown -R www:www $(REMOTE_DIR)
remember that computers suck.