forked from 0xcf/decal-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
32 lines (24 loc) · 778 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
LISTEN_IP := 0.0.0.0
RANDOM_PORT := $(shell expr $$(( 8000 + (`id -u` % 1000) + 2 )))
DEPLOY_DIR := public_html
.PHONY: dev
dev: bundle
bundle exec jekyll serve --host $(LISTEN_IP) -P $(RANDOM_PORT)
.PHONY: local-dev
local-dev: LISTEN_IP=127.0.0.1
local-dev: dev
.PHONY: local-dev
local-dev: bundle
bundle exec jekyll serve
.PHONY: bundle
bundle:
bundle config set --local deployment 'true'&&bundle install
.PHONY: build
build:
bundle exec jekyll build --verbose --trace
.PHONY: clean
clean:
rm -rf .bundle vendor
.PHONY: deploy
deploy:
ssh -o StrictHostKeyChecking=no [email protected] "mkdir -p ~/$(DEPLOY_DIR)" && rsync -avzpce "ssh -o StrictHostKeyChecking=no" --del _site/ --exclude static --exclude archives [email protected]:$(DEPLOY_DIR)