Skip to content
Snippets Groups Projects
Commit 69ca580c authored by Joel Nothman's avatar Joel Nothman Committed by Andreas Mueller
Browse files

[MRG] CI build web site from branches (#7498)

* CI build web site from branches

Fixes #7495

* CI Try one regexp instead of list
parent 2f4b661a
No related branches found
No related tags found
No related merge requests found
......@@ -12,22 +12,30 @@ fi
DOC_REPO="scikit-learn.github.io"
MSG="Pushing the docs for revision for branch: $CIRCLE_BRANCH, commit $CIRCLE_SHA1"
if [ "$CIRCLE_BRANCH" = "master" ]
then
dir=dev
else
# Strip off .X
dir="${CIRCLE_BRANCH::-2}"
fi
MSG="Pushing the docs to $dir/ for branch: $CIRCLE_BRANCH, commit $CIRCLE_SHA1"
cd $HOME
if [ ! -d $DOC_REPO ];
then git clone "git@github.com:scikit-learn/"$DOC_REPO".git";
fi
cd $DOC_REPO
git checkout master
git reset --hard origin/master
git rm -rf dev/ && rm -rf dev/
cp -R $HOME/scikit-learn/doc/_build/html/stable dev
git checkout $CIRCLE_BRANCH
git reset --hard origin/$CIRCLE_BRANCH
git rm -rf $dir/ && rm -rf $dir/
cp -R $HOME/scikit-learn/doc/_build/html/stable $dir
git config --global user.email "olivier.grisel+sklearn-ci@gmail.com"
git config --global user.name $USERNAME
git config --global push.default matching
git add -f dev/
git commit -m "$MSG" dev
git add -f $dir/
git commit -m "$MSG" $dir
git push
echo $MSG
......@@ -13,7 +13,7 @@ test:
- cat ~/log.txt && if grep -q "Traceback (most recent call last):" ~/log.txt; then false; else true; fi
deployment:
push:
branch: master
branch: /^master$|^[0-9]+\.[0-9]+\.X$/
commands:
- bash build_tools/circle/push_doc.sh
general:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment