forked from uwsampa/research-group-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (35 loc) · 1.9 KB
/
Makefile
File metadata and controls
48 lines (35 loc) · 1.9 KB
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
47
48
# targets that aren't filenames
.PHONY: all clean deploy build serve
all: build
PYTHON ?= python3
ADSABS_SECRET := $(wildcard .secrets/adsabs_api_key)
_includes/pubs.html: bib/pubs.bib _data/people.yml scripts/render_front_page_papers.py scripts/render_publications_include.py $(ADSABS_SECRET)
mkdir -p _includes
$(PYTHON) scripts/render_publications_include.py
_includes/publication-search-tags.html: bib/pubs.bib _config.yml _data/people.yml scripts/render_front_page_papers.py
mkdir -p _includes
$(PYTHON) scripts/render_front_page_papers.py
_data/publication-topics.yml: bib/pubs.bib _config.yml _data/people.yml scripts/render_front_page_papers.py
mkdir -p _data
$(PYTHON) scripts/render_front_page_papers.py
_includes/publication-count.html: bib/pubs.bib scripts/render_front_page_papers.py
mkdir -p _includes
$(PYTHON) scripts/render_front_page_papers.py
_includes/front-page-papers.html: bib/pubs.bib _config.yml _data/people.yml scripts/render_front_page_papers.py
mkdir -p _includes
$(PYTHON) scripts/render_front_page_papers.py
build: _includes/pubs.html _includes/front-page-papers.html _includes/publication-count.html _includes/publication-search-tags.html _data/publication-topics.yml
jekyll build
# you can configure these at the shell, e.g.:
# SERVE_PORT=5001 make serve
SERVE_HOST ?= 127.0.0.1
SERVE_PORT ?= 5000
serve: _includes/pubs.html _includes/front-page-papers.html _includes/publication-count.html _includes/publication-search-tags.html _data/publication-topics.yml
jekyll serve --port $(SERVE_PORT) --host $(SERVE_HOST)
clean:
$(RM) -r _site _includes/pubs.html _includes/front-page-papers.html _includes/publication-count.html _includes/publication-search-tags.html _data/publication-topics.yml
DEPLOY_HOST ?= yourwebpage.com
DEPLOY_PATH ?= www/
RSYNC := rsync --compress --recursive --checksum --itemize-changes --delete -e ssh
deploy: clean build
$(RSYNC) _site/ $(DEPLOY_HOST):$(DEPLOY_PATH)