~oliverpool/log.pfad.fr

log.pfad.fr/Makefile -rw-r--r-- 764 bytes
843ff0faoliverpool style: nicer pre 11 days ago
                                                                                
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
31
32
33
# include .env
# export

build:
	rm -rf dist
	./kiln build

deploy: build deploy-html deploy-gmi

deploy-html:
	tar -C dist/html -cvz . > dist/html.tar.gz
	curl --oauth2-bearer "${OAUTH_TOKEN}" \
		-Fcontent=@dist/html.tar.gz \
		https://pages.sr.ht/publish/log.pfad.fr

deploy-gmi:
	tar -C dist/gmi -cvz . > dist/gmi.tar.gz
	curl --oauth2-bearer "${OAUTH_TOKEN}" \
		-Fcontent=@dist/gmi.tar.gz \
		-Fprotocol=GEMINI \
		https://pages.sr.ht/publish/log.pfad.fr

dev: build
	$(MAKE) --no-print-directory -j2 dev-tasks

dev-tasks: watch serve-html

serve-html:
	@xdg-open http://127.0.0.1:8087
	@php -S 127.0.0.1:8087 -t dist/html

watch:
	@inotifywait -m -e close_write -r --exclude "(dist|\.git)" . | while read events; do $(MAKE) --no-print-directory build; done