Skip to content

DOC: Not pushing the docs to github pages in PRs #24316

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 17, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 27 additions & 22 deletions ci/build_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,33 @@ if [ "$DOC" ]; then
echo # Create and send docs #
echo ########################

cd build/html
git config --global user.email "[email protected]"
git config --global user.name "pandas-docs-bot"

# create the repo
git init

touch README
git add README
git commit -m "Initial commit" --allow-empty
git branch gh-pages
git checkout gh-pages
touch .nojekyll
git add --all .
git commit -m "Version" --allow-empty

git remote remove origin
git remote add origin "https://${PANDAS_GH_TOKEN}@github.com/pandas-dev/pandas-docs-travis.git"
git fetch origin
git remote -v

git push origin gh-pages -f
echo "Only uploading docs when TRAVIS_PULL_REQUEST is 'false'"
echo "TRAVIS_PULL_REQUEST: ${TRAVIS_PULL_REQUEST}"

if [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
cd build/html
git config --global user.email "[email protected]"
git config --global user.name "pandas-docs-bot"

# create the repo
git init

touch README
git add README
git commit -m "Initial commit" --allow-empty
git branch gh-pages
git checkout gh-pages
touch .nojekyll
git add --all .
git commit -m "Version" --allow-empty

git remote remove origin
git remote add origin "https://${PANDAS_GH_TOKEN}@github.com/pandas-dev/pandas-docs-travis.git"
git fetch origin
git remote -v

git push origin gh-pages -f
fi
fi

exit 0