Statistics
| Branch: | Revision:

iof-website / Makefile @ 4a7c8df9

History | View | Annotate | Download (963 Bytes)

1
# by default run the website locally
2
all: local
3

    
4
.PHONY: all build-ans deploy-ans ans build-mac mac build-local local serve clean
5

    
6
# check whether browser sync is installed
7
BROWSER_SYNC := $(shell command -v browser-sync 2> /dev/null)
8

    
9
# build for ans website
10
build-ans:
11
	@echo "Building website"
12
	jekyll build -s . --config _config.yml,_ans.yml
13

    
14
# deploys the built website to ans. first, the website needs to be built
15
deploy-ans: build-ans
16
	rsync -avcz -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --progress _site/ segata@ans.disi.unitn.it:/home/admin/docker_volumes/static-web/www/poprow/ --delete
17

    
18
serve:
19
	jekyll serve
20

    
21
build:
22
	jekyll build --config _config.yml
23

    
24
watch:
25
	jekyll build --config _config.yml --watch
26

    
27
browser-sync:
28
ifndef BROWSER_SYNC
29
	$(error "browser-sync is not available. please install or use 'make serve'")
30
endif
31
	browser-sync start --server '_site' --files '_site'
32

    
33
# removes the _site folder
34
clean:
35
	rm -rf _site