-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
37 lines (33 loc) · 1.13 KB
/
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
# build and serve the website using docker:
# * does not require a ruby installation (!!!)
# * a bit slower than running ruby natively, but worth the savings in hassle
# * gems are downloaded locally to "vendor"
# on importance of ":cached": see https://docs.docker.com/docker-for-mac/osxfs-caching/
JEKYLL_VERSION = 3.8
PWD = $(shell pwd)
LOCALHOST = 4000
install:
$(info Make: building web site)
@docker run \
--rm \
--volume="$(PWD):/srv/jekyll:cached" \
--volume="$(PWD)/vendor/bundle:/usr/local/bundle:cached" \
-it jekyll/jekyll:$(JEKYLL_VERSION) \
bundle install
build:
$(info Make: building web site)
@docker run \
--rm \
--volume="$(PWD):/srv/jekyll:cached" \
--volume="$(PWD)/vendor/bundle:/usr/local/bundle:cached" \
-it jekyll/jekyll:$(JEKYLL_VERSION) \
jekyll build
devserver:
$(info Make: building web site and serving to localhost:$(LOCALHOST))
@docker run \
--rm \
--volume="$(PWD):/srv/jekyll:cached" \
--volume="$(PWD)/vendor/bundle:/usr/local/bundle:cached" \
-p $(LOCALHOST):4000 \
-it jekyll/jekyll:$(JEKYLL_VERSION) \
jekyll serve --watch --incremental