-
Notifications
You must be signed in to change notification settings - Fork 51
/
Makefile
47 lines (35 loc) · 1.05 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
38
39
40
41
42
43
44
45
46
#
# Makefile to build the bootcamp website.
#
# The source of the html files.
HTML_DIR=web
# Temporary directory to store the output in.
TEMP_DIR=~/temp/bootcamp
# Remote host and directory that contains the site.
WEB_DIR=sites/bootcamp/
WEB_PATH=${WEB_HOST}:${WEB_DIR}
# Default action is to serve the directory.
all:
pyblue -r ${HTML_DIR} -p 8000
pull:
# Bring this repository in sync with master.
git pull https://github.com/biostars/bootcamp-central.git
# Removes the temporary directory.
clean:
rm -rf ${TEMP_DIR}
# Wipes the remote web path.
remoteclean:
ssh ${WEB_HOST} "rm -rf ${WEB_DIR}/*"
# Generates the site into a temporary directory.
generate:
# Makes the temporary directory
mkdir -p ${TEMP_DIR}
# We need this since html files may include other markdown files.
find . -type f -name "*.html" -exec touch '{}' \;
# Genereate the static site.
pyblue -r ${HTML_DIR} -o ${TEMP_DIR}
# Publish to the public site via rsync.
publish: generate
# Synchronize the changed files
rsync -avz ${TEMP_DIR}/* ${WEB_PATH}