-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (31 loc) · 944 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
HUGO_VERSION=0.83.1-asciidoctor
NETLIFY_CLI_VERSION=8.6.23
-include credentials.sh
theme:
(rm -rf themes && mkdir -p themes)
(cd themes && git clone https://github.com/pdevty/material-design.git)
build:
(rm -rf site && mkdir -p site)
docker run --rm \
-v $(PWD):/src \
-v $(PWD)/site:/site \
-e "HUGO_ENV=production" \
--entrypoint hugo-official \
klakegg/hugo:$(HUGO_VERSION) --minify -d /site
serve:
(rm -rf site && mkdir -p site)
docker run -it --rm \
-v $(PWD):/src \
-v $(PWD)/site:/site \
-e "HUGO_ENV=dev" \
--entrypoint hugo-official \
-p 1313:1313 \
klakegg/hugo:$(HUGO_VERSION) \
server --buildDrafts --buildFuture --buildExpired \
--bind 0.0.0.0 --destination /site
deploy:
docker run --rm \
-e NETLIFY_AUTH_TOKEN="$(NETLIFY_AUTH_TOKEN)" \
-e NETLIFY_SITE_ID="$(NETLIFY_SITE_ID)" \
-v $(PWD)/site:/project \
williamjackson/netlify-cli:$(NETLIFY_CLI_VERSION) deploy --prod --dir=/project