~dricottone/blog

ref: ae09e17cc980df9e0a6ef2037121890deba3cf24 blog/Makefile -rw-r--r-- 737 bytes
ae09e17cDominic Ricottone Automated generation of PDF CV based on Markdown CV 2 years 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
TARGET_USER=deploy
TARGET_HOST=deploy-aws2

.PHONY: clean dev build sync

clean:
	rm -rf public resources themes
	rm -rf scripts/cv.aux scripts/cv.log scripts/cv.out scripts/cv.tex

static/files/dominic-ricottone.pdf: content/cv.md
	sed content/cv.md \
		-e 's/南山大学/\\begin{CJK}{UTF8}{min}&\\end{CJK}/' \
		| scripts/cv.awk > scripts/cv.tex
	cd scripts && pdflatex cv.tex
	mv scripts/cv.pdf static/files/dominic-ricottone.pdf

dev: static/files/dominic-ricottone.pdf
	hugo server --buildDrafts --bind 127.0.0.1 --port 8080

build: clean static/files/dominic-ricottone.pdf
	hugo

sync: build
	rsync --recursive --links --compress --delete \
		--chown=$(TARGET_USER):$(TARGET_USER) \
		public/ $(TARGET_HOST):/var/deploy/webroot/