Multi version doc deployment

This commit is contained in:
Lysandre
2019-10-22 17:51:30 -04:00
parent e16d46843a
commit bc3e57d551
2 changed files with 24 additions and 3 deletions

View File

@@ -81,12 +81,12 @@ jobs:
- checkout
- run: sudo pip install --progress-bar off -r docs/requirements.txt
- run: sudo pip install --progress-bar off -r requirements.txt
- run: cd docs && make clean && make html && scp -r -oStrictHostKeyChecking=no _build/html/* $doc:$dir
- run: ./deploy.sh
workflow_filters: &workflow_filters
filters:
branches:
only:
- master
- deploy_doc
workflows:
version: 2
build_and_test:
@@ -96,4 +96,4 @@ workflows:
- build_py3_tf
- build_py2_torch
- build_py2_tf
- deploy_doc: *workflow_filters
- deploy_doc: *workflow_filters

21
.circleci/deploy.sh Executable file
View File

@@ -0,0 +1,21 @@
cd docs
function deploy_doc(){
echo "Creating doc at commit $1 and pushing to folder $2"
git checkout $1
if [ ! -z "$2" ]
then
echo "Pushing version" $2
make clean && make html && scp -r -oStrictHostKeyChecking=no _build/html $doc:$dir/$2
else
echo "Pushing master"
make clean && make html && scp -r -oStrictHostKeyChecking=no _build/html/* $doc:$dir
fi
}
deploy_doc "master"
deploy_doc "b33a385" v1.0.0
deploy_doc "fe02e45" v1.1.0
eploy_doc "89fd345" v1.2.0
deploy_doc "fc9faa8" v2.0.0
deploy_doc "3ddce1d" v2.1.1