-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (30 loc) · 888 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
32
33
34
35
# Command line options.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = tuda-geo
SOURCEDIR = .
BUILDDIR = _build
# Will also be triggered if "make" is provided without argument.
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.ONESHELL:
deploy:
mkdir deploy
cp -r _build/html/* deploy/.
cp -r _build/html/.[a-zA-Z]* deploy/.
cp -r .git deploy/.
cd deploy/
git branch -D gh-pages &>/dev/null
git checkout --orphan gh-pages
git add --all
git commit -m 'Update website'
git push -f --set-upstream origin gh-pages
cd ..
rm -rf deploy/
preview:
xdg-open _build/html/index.html
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)