зеркало из https://github.com/mozilla/mozillians.git
Added build-github script from Zamboni to push docs to gh-pages automagically.
This commit is contained in:
Родитель
a2764efa6a
Коммит
9ed4c3966d
|
@ -0,0 +1,30 @@
|
||||||
|
#!/bin/zsh
|
||||||
|
|
||||||
|
# Should be run from the docs directory: (cd docs && ./build-github.zsh)
|
||||||
|
|
||||||
|
REPO=$(dirname $(pwd))
|
||||||
|
GH=_gh-pages
|
||||||
|
|
||||||
|
|
||||||
|
# Checkout the gh-pages branch, if necessary.
|
||||||
|
if [[ ! -d $GH ]]; then
|
||||||
|
git clone $REPO $GH
|
||||||
|
pushd $GH
|
||||||
|
git checkout -b gh-pages origin/gh-pages
|
||||||
|
popd
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Update and clean out the _gh-pages target dir.
|
||||||
|
pushd $GH && git pull && rm -rf * && popd
|
||||||
|
|
||||||
|
# Make a clean build.
|
||||||
|
make clean dirhtml
|
||||||
|
|
||||||
|
# Move the fresh build over.
|
||||||
|
cp -r _build/dirhtml/* $GH
|
||||||
|
cd $GH
|
||||||
|
|
||||||
|
# Commit.
|
||||||
|
git add .
|
||||||
|
git commit -am "gh-pages build on $(date)"
|
||||||
|
git push origin gh-pages
|
|
@ -70,4 +70,12 @@ Here's a nice macro for creating headings::
|
||||||
Compiling Documentation
|
Compiling Documentation
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
Playdoh hosts its documentation on github pages.
|
Playdoh hosts its documentation on `github pages
|
||||||
|
<http://mozilla.github.com/playdoh/>`_. When you change the docs, make sure
|
||||||
|
they still build properly and look all right locally::
|
||||||
|
|
||||||
|
cd docs && make html && open _build/html/index.html
|
||||||
|
|
||||||
|
If they do, run a build and push it to gh-pages::
|
||||||
|
|
||||||
|
./build-github.zsh
|
||||||
|
|
Загрузка…
Ссылка в новой задаче