Raw File
Tip revision: 63fc5c5d4d3352a79f4c1a1a725e767ae6dc8734 authored by Aaron Meyer on 03 April 2024, 14:09:47 UTC
Merge pull request #538 from braun-steven/main
Tip revision: 63fc5c5
# Inspired from scikit-image
if [[ $TRAVIS_PULL_REQUEST == false && $TRAVIS_BRANCH == "master" &&
	      $DEPLOY_DOCS == 1 ]]
	echo "---------------------------------------------------"
	echo " building doc and pushing to website"
    git config --global ""
    git config --global "Travis"

	# Install the dependencies
	cd doc
	echo "-- Installing dependencies"
	conda install matplotlib Pillow sphinx
	pip install -r requirements_doc.txt

	# Making the doc
	echo "-- Building doc"
	make html

	# If build succeeded, update website
	if [ $? -eq 0 ]; then
		echo 'Documentation was successfully built, updating the website.'
		cd ..

		echo "-- Cloning doc repo"
		git clone --quiet doc_folder
		cd doc_folder
		git rm -r dev/*
		mkdir -p dev
		cp -r ../doc/_build/html/* dev/

		echo "Pushinng to git"
		git add dev
		git commit -m "Travis auto-update"
		git push --force --quiet "https://${gh_token}" > /dev/null 2>&1
	# Build failed
		echo '-- Build FAILED. Not updating the website.'
    echo "NOT BUILDIGN DOC -- will only push docs from master and if DEPLOY_DOCS == 1"

back to top