-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
49 lines (40 loc) · 900 Bytes
/
Makefile
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
DEPLOY_HOST = [email protected]
DEPLOY_DIR = /home/tga/space55.xyz
DEPLOY_SERVICE = space55.xyz
FONT_TARGETS = static/fonts/NotoSerifJP.woff2
.PHONY: dev
dev:
DEV=1 bun run --watch main.ts
.PHONY: start
start:
bun run main.ts
.PHONY: deploy
deploy:
rsync \
-av --delete \
--exclude .DS_Store \
--exclude .git \
--exclude .env \
--exclude data \
--exclude node_modules \
. $(DEPLOY_HOST):$(DEPLOY_DIR)
ssh -t $(DEPLOY_HOST) "sudo systemctl restart $(DEPLOY_SERVICE)"
.PHONY: status
status:
ssh -t $(DEPLOY_HOST) "sudo systemctl status $(DEPLOY_SERVICE)"
.PHONY: check
check:
bunx tsc
.PHONY: links
links:
bun run scripts/links.ts
.PHONY: fonts
fonts: $(FONT_TARGETS)
static/fonts/NotoSerifJP.woff2: static/fonts/NotoSerifJP.ttf jap.ts
pyftsubset "$<" \
--text-file="$(wordlist 2,64,$^)" \
--flavor=woff2 \
--output-file="$@"
.PHONY: clean
clean:
rm $(FONT_TARGETS)