forked from mrtazz/restclient-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.docs.mk
35 lines (28 loc) · 1.12 KB
/
Makefile.docs.mk
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
# Make tasks to create and deploy documentation
.PHONY: docs clean-docs deploy-docs doxygen jekyll
GAUGES_CODE="539c6c8de32bb442640005f3"
doxygen:
doxygen doxygen.config
jekyll:
install -d docs
echo "gaugesid: $(GAUGES_CODE)" > docs/_config.yml
echo "projecturl: $(PROJECT_URL)" >> docs/_config.yml
echo "basesite: http://www.unwiredcouch.com" >> docs/_config.yml
echo "markdown: redcarpet" >> docs/_config.yml
echo "---" > docs/index.md
echo "layout: project" >> docs/index.md
echo "title: $(NAME)" >> docs/index.md
echo "---" >> docs/index.md
cat README.md >> docs/index.md
docs: doxygen jekyll
clean-docs:
rm -rf ./docs
deploy-docs: docs
@cd docs && git init && git remote add upstream "https://${GH_TOKEN}@github.com/mrtazz/$(NAME).git" && \
git submodule add https://github.com/mrtazz/jekyll-layouts.git ./_layouts && \
git submodule update --init && \
git fetch upstream && git reset upstream/gh-pages && \
git config user.name 'Daniel Schauenberg' && git config user.email [email protected] && \
touch . && git add -A . && \
git commit -m "rebuild pages at $(VERSION)" && \
git push -q upstream HEAD:gh-pages