Update docs structure for gh-pages

This commit is contained in:
Kim Silkebækken 2012-12-14 14:03:59 +01:00
parent 79e2f2aee6
commit f3a03aa26a
8 changed files with 17 additions and 8 deletions

View File

@ -1,5 +1,4 @@
# Makefile for Sphinx documentation
SPHINXOPTS =
SPHINXBUILD = sphinx-build2
PAPER =
@ -8,14 +7,12 @@ BUILDDIR = _build
# Internal variables
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
.PHONY: help clean html
GH_PAGES_SOURCES = source Makefile
GH_SOURCE_BRANCH = develop
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
.PHONY: clean html gh-pages
clean:
-rm -rf $(BUILDDIR)/*
@ -24,3 +21,16 @@ html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
gh-pages:
git checkout gh-pages
find .. -maxdepth 1 ! -name '.git*' -and ! -name 'docs' -exec rm -rf {} \;
git checkout ${GH_SOURCE_BRANCH} ${GH_PAGES_SOURCES}
git reset HEAD
make html
mv -fv _build/html/* ..
rm -rf _build ${GH_PAGES_SOURCES}
git add ..
git commit -m "Create gh-pages for '`git log develop -1 --pretty=oneline --abbrev-commit`'"
#git push origin gh-pages
git checkout ${GH_SOURCE_BRANCH}

View File

@ -5,7 +5,6 @@ import sys, os
sys.path.insert(0, os.path.abspath('../powerline'))
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.viewcode']
templates_path = ['_templates']
source_suffix = '.rst'
master_doc = 'index'
project = u'Powerline'