-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (25 loc) · 952 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
.PHONY: all serve build update
all: serve
# Use the latest version of Jekyll compatible with GitHub Pages
# https://pages.github.com/versions/
JEKYLL_VERSION=3.8
# Use the official docker image for that version
image = jekyll/jekyll:${JEKYLL_VERSION}
# Bind the current dir to jekylls working dir
appdir = --volume="${PWD}:/srv/jekyll"
# Bind the local bundle dir to so it is cached between runs
cache = --volume="${PWD}/vendor/bundle:/usr/local/bundle"
# Publish ports 4000 for HTTP and 35729 for livereload
publish= --publish 4000:4000 --publish 35729:35729
# Serve the static files for local development
serve:
@docker run --rm -it ${appdir} ${cache} ${publish} ${image} \
jekyll serve --drafts --watch --force-polling --livereload
# Build the static files
build:
@docker run --rm -it ${appdir} ${cache} ${image} \
jekyll build
# Update the Gemfile.lock
update:
@docker run --rm -it ${appdir} ${cache} ${image} \
bundle update