mirror of https://github.com/searxng/searxng.git
Makefile: gh-pages: keep history of gh-branch intact (don't drop)
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
04eeeb53a1
commit
121f696460
3
Makefile
3
Makefile
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
export GIT_URL=https://github.com/asciimoo/searx
|
export GIT_URL=https://github.com/asciimoo/searx
|
||||||
export SEARX_URL=https://searx.me
|
export SEARX_URL=https://searx.me
|
||||||
|
export DOCS_URL=https://asciimoo.github.io/searx/
|
||||||
|
|
||||||
PYOBJECTS = searx
|
PYOBJECTS = searx
|
||||||
DOC = docs
|
DOC = docs
|
||||||
|
@ -59,6 +60,8 @@ PHONY += docs-live
|
||||||
docs-live: pyenvinstall sphinx-live
|
docs-live: pyenvinstall sphinx-live
|
||||||
$(call cmd,sphinx_autobuild,html,docs,docs)
|
$(call cmd,sphinx_autobuild,html,docs,docs)
|
||||||
|
|
||||||
|
$(GH_PAGES)::
|
||||||
|
@echo "doc available at --> $(DOCS_URL)"
|
||||||
|
|
||||||
# test
|
# test
|
||||||
# ----
|
# ----
|
||||||
|
|
|
@ -194,20 +194,20 @@ $(BOOKS_CLEAN):
|
||||||
# github pages
|
# github pages
|
||||||
|
|
||||||
PHONY += $(GH_PAGES)
|
PHONY += $(GH_PAGES)
|
||||||
$(GH_PAGES):
|
$(GH_PAGES)::
|
||||||
$(MAKE) docs
|
$(MAKE) docs
|
||||||
[ -d "gh-pages/.git" ] || git clone $(GIT_URL) gh-pages
|
[ -d "gh-pages/.git" ] || git clone $(GIT_URL) gh-pages
|
||||||
-cd $(GH_PAGES); git checkout --orphan gh-pages || exit 0
|
-cd $(GH_PAGES); git checkout gh-pages >/dev/null
|
||||||
rm -rf $(GH_PAGES)/* $(GH_PAGES)/.gitignore
|
-cd $(GH_PAGES); ls -A | grep -v '.git$$' | xargs rm -rf
|
||||||
touch $(GH_PAGES)/.nojekyll ;\
|
|
||||||
cp -r $(DOCS_DIST)/* $(GH_PAGES)/
|
cp -r $(DOCS_DIST)/* $(GH_PAGES)/
|
||||||
|
touch $(GH_PAGES)/.nojekyll
|
||||||
echo "<html><head><META http-equiv='refresh' content='0;URL=index.html'></head></html>" > $(GH_PAGES)/404.html
|
echo "<html><head><META http-equiv='refresh' content='0;URL=index.html'></head></html>" > $(GH_PAGES)/404.html
|
||||||
-cd $(GH_PAGES); git push origin :gh-pages
|
|
||||||
cd $(GH_PAGES);\
|
cd $(GH_PAGES);\
|
||||||
git add --all . ;\
|
git add --all . ;\
|
||||||
git commit -m "gh-pages: updated" ;\
|
git commit -m "gh-pages: updated" ;\
|
||||||
git push origin gh-pages
|
git push origin gh-pages
|
||||||
|
|
||||||
|
|
||||||
PHONY += docs-clean
|
PHONY += docs-clean
|
||||||
docs-clean: $(BOOKS_CLEAN)
|
docs-clean: $(BOOKS_CLEAN)
|
||||||
$(call cmd,sphinx_clean)
|
$(call cmd,sphinx_clean)
|
||||||
|
|
Loading…
Reference in New Issue