10000 [MRG] CI build web site from branches (#7498) · scikit-learn/scikit-learn@69ca580 · GitHub
[go: up one dir, main page]

Skip to content

Commit 69ca580

Browse files
jnothmanamueller
authored andcommitted
[MRG] CI build web site from branches (#7498)
* CI build web site from branches Fixes #7495 * CI Try one regexp instead of list
1 parent 2f4b661 commit 69ca580

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

build_tools/circle/push_doc.sh

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,30 @@ fi
1212

1313
DOC_REPO="scikit-learn.github.io"
1414

15-
MSG="Pushing the docs for revision for branch: $CIRCLE_BRANCH, commit $CIRCLE_SHA1"
15+
if [ "$CIRCLE_BRANCH" = "master" ]
16+
then
17+
dir=dev
18+
else
19+
# Strip off .X
20+
dir="${CIRCLE_BRANCH::-2}"
21+
fi
22+
23+
MSG="Pushing the docs to $dir/ for branch: $CIRCLE_BRANCH, commit $CIRCLE_SHA1"
1624

1725
cd $HOME
1826
if [ ! -d $DOC_REPO ];
1927
then git clone "git@github.com:scikit-learn/"$DOC_REPO".git";
2028
fi
2129
cd $DOC_REPO
22-
git checkout master
23-
git reset --hard origin/master
24-
git rm -rf dev/ && rm -rf dev/
25-
cp -R $HOME/scikit-learn/doc/_build/html/stable dev
30+
git checkout $CIRCLE_BRANCH
31+
git reset --hard origin/$CIRCLE_BRANCH
32+
git rm -rf $dir/ && rm -rf $dir/
33+
cp -R $HOME/scikit-learn/doc/_build/html/stable $dir
2634
git config --global user.email "olivier.grisel+sklearn-ci@gmail.com"
2735
git config --global user.name $USERNAME
2836
git config --global push.default matching
29-
git add -f dev/
30-
git commit -m "$MSG" dev
37+
git add -f $dir/
38+
git commit -m "$MSG" $dir
3139
git push
3240

3341
echo $MSG

circle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ test:
1313
- cat ~/log.txt && if grep -q "Traceback (most recent call last):" ~/log.txt; then false; else true; fi
1414
deployment:
1515
push:
16-
branch: master
16+
branch: /^master$|^[0-9]+\.[0-9]+\.X$/
1717
commands:
1818
- bash build_tools/circle/push_doc.sh
1919
general:

0 commit comments

Comments
 (0)
0