deploy.sh 1.47 KB
Newer Older
Lysandre's avatar
Lysandre committed
1
2
3
4
5
cd docs

function deploy_doc(){
	echo "Creating doc at commit $1 and pushing to folder $2"
	git checkout $1
Lysandre's avatar
Lysandre committed
6
	if [ ! -z "$2" ]
Lysandre's avatar
Lysandre committed
7
	then
Sylvain Gugger's avatar
Sylvain Gugger committed
8
		if [ "$2" == "master" ]; then
Sylvain Gugger's avatar
Sylvain Gugger committed
9
10
11
12
		    echo "Pushing master"
			make clean && make html && scp -r -oStrictHostKeyChecking=no _build/html/* $doc:$dir/$2/
			cp -r _build/html/_static .
		elif ssh -oStrictHostKeyChecking=no $doc "[ -d $dir/$2 ]"; then
13
			echo "Directory" $2 "already exists"
Sylvain Gugger's avatar
Sylvain Gugger committed
14
			scp -r -oStrictHostKeyChecking=no _static/* $doc:$dir/$2/_static/
15
16
		else
			echo "Pushing version" $2
Sylvain Gugger's avatar
Sylvain Gugger committed
17
			make clean && make html
Sylvain Gugger's avatar
Sylvain Gugger committed
18
19
20
			rm -rf _build/html/_static
			cp -r _static _build/html
			scp -r -oStrictHostKeyChecking=no _build/html $doc:$dir/$2
21
		fi
Lysandre's avatar
Lysandre committed
22
	else
Sylvain Gugger's avatar
Sylvain Gugger committed
23
		echo "Pushing stable"
Sylvain Gugger's avatar
Sylvain Gugger committed
24
25
26
27
		make clean && make html
		rm -rf _build/html/_static
		cp -r _static _build/html
		scp -r -oStrictHostKeyChecking=no _build/html/* $doc:$dir
28
29
30
	fi
}

31
32
# You can find the commit for each tag on https://github.com/huggingface/transformers/tags
deploy_doc "master" master
Lysandre's avatar
Lysandre committed
33
34
deploy_doc "b33a385" v1.0.0
deploy_doc "fe02e45" v1.1.0
Lysandre Debut's avatar
Lysandre Debut committed
35
deploy_doc "89fd345" v1.2.0
Lysandre's avatar
Lysandre committed
36
37
deploy_doc "fc9faa8" v2.0.0
deploy_doc "3ddce1d" v2.1.1
Lysandre's avatar
Lysandre committed
38
deploy_doc "3616209" v2.2.0
upura's avatar
upura committed
39
deploy_doc "d0f8b9a" v2.3.0
Lysandre's avatar
Lysandre committed
40
41
deploy_doc "6664ea9" v2.4.0
deploy_doc "fb560dc" v2.5.0
42
43
44
45
46
47
48
deploy_doc "b90745c" v2.5.1
deploy_doc "fbc5bf1" v2.6.0
deploy_doc "6f5a12a" v2.7.0
deploy_doc "11c3257" v2.8.0
deploy_doc "e7cfc1a" v2.9.0
deploy_doc "7cb203f" v2.9.1
deploy_doc "10d7239" v2.10.0 
Lysandre Debut's avatar
Lysandre Debut committed
49
deploy_doc "b42586e" v2.11.0
sgugger's avatar
sgugger committed
50
deploy_doc "7fb8bdf" #v3.0.2 Latest stable release