-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (30 loc) · 818 Bytes
/
Makefile
File metadata and controls
40 lines (30 loc) · 818 Bytes
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
HEAD_REV=$(shell git rev-parse HEAD)
all: update build
setup:
npm install -g pug-cli
npm install
update:
npm install
npm update
build: build/index.html build/images build/css build/js
build/index.html: index.pug
pug $< -o ./build
build/images: images
rsync -rupE $< build/
build/css: css
rsync -rupE $< build/
build/js: js
rsync -rupE $< build/
deploy: build
rm -rf build/.git
git -C build init .
git -C build fetch "git@github.com:ichealthhack/ichealthhack.github.io.git" master
git -C build reset --soft FETCH_HEAD
git -C build add .
if ! git -C build diff-index --quiet HEAD ; then \
git -C build commit -m "Deploy ichealthhack/healthhack17@${HEAD_REV}" && \
git -C build push "git@github.com:ichealthhack/ichealthhack.github.io.git" master:master ; \
fi
cd ..
clean:
rm -rf ./build