File tree Expand file tree Collapse file tree 2 files changed +22
-23
lines changed Expand file tree Collapse file tree 2 files changed +22
-23
lines changed Original file line number Diff line number Diff line change 44# The behavior of the script is controlled by environment variable defined
55# in the circle.yml in the top level folder of the project.
66
7- MSG=" Pushing the docs for revision for branch: $CIRCLE_BRANCH , commit $CIRCLE_SHA1 "
7+ if [ ! -z " $1 " ]
8+ then DOC_FOLDER=$1
9+ fi
10+
11+ MSG=" Pushing the docs for revision for branch: $CIRCLE_BRANCH , commit $CIRCLE_SHA1 , folder: $DOC_FOLDER "
812
913cd $HOME
10- # Copy the build docs to a temporary folder
11- rm -rf tmp
12- mkdir tmp
13- cp -R $HOME /$DOC_REPO /doc/build/html/* ./tmp/
1414
1515# Clone the docs repo if it isnt already there
1616if [ ! -d $DOC_REPO ];
1717 then git clone
" [email protected] :$USERNAME /" $DOC_REPO " .git" ; 1818fi
1919
20+ # Copy the build docs to a temporary folder
21+ rm -rf tmp
22+ mkdir tmp
23+ cp -R $HOME /$DOC_REPO /doc/build/html/* ./tmp/
24+
2025cd $DOC_REPO
2126git branch gh-pages
2227git checkout -f gh-pages
2328git reset --hard origin/gh-pages
2429git clean -dfx
25-
26- for name in $( ls -A $HOME /$DOC_REPO ) ; do
27- case $name in
28- .nojekyll) # So that github does not build this as a Jekyll website.
29- ;;
30- circle.yml) # Config so that build gh-pages branch.
31- ;;
32- * )
33- git rm -rf $name
34- ;;
35- esac
36- done
30+ git rm -rf $HOME /$DOC_REPO /$DOC_FOLDER && rm -rf $HOME /$DOC_REPO /$DOC_FOLDER
3731
3832# Copy the new build docs
39- mkdir $DOC_URL
40- cp -R $HOME /tmp/* ./$DOC_URL /
33+ mkdir $DOC_FOLDER
34+ cp -R $HOME /tmp/* ./$DOC_FOLDER /
4135
4236git config --global user.email $EMAIL
4337git config --global user.name $USERNAME
44- git add -f ./$DOC_URL /
38+ git add -f ./$DOC_FOLDER /
4539git commit -m " $MSG "
4640git push -f origin gh-pages
4741
48- echo $MSG
42+ echo $MSG
Original file line number Diff line number Diff line change @@ -44,10 +44,14 @@ test:
4444 override :
4545 - cat ~/log.txt && if grep -q "Traceback (most recent call last):" ~/log.txt; then false; else true; fi
4646deployment :
47- push :
47+ master :
48+ branch : master
49+ commands :
50+ - bash ci_scripts/push_doc.sh 'stable'
51+ development :
4852 branch : development
4953 commands :
50- - bash ci_scripts/push_doc.sh
54+ - bash ci_scripts/push_doc.sh 'dev'
5155general :
5256 # Open the doc to the API
5357 artifacts :
@@ -57,3 +61,4 @@ general:
5761 branches :
5862 only :
5963 - development
64+ - master
You can’t perform that action at this time.
0 commit comments