From 9d33201694743508e88d7a0d66f8f651ba33a5df Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Mon, 17 Dec 2018 00:52:13 +0000 Subject: [PATCH 1/2] DOC: Not pushing the docs to github pages in PRs --- ci/build_docs.sh | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/ci/build_docs.sh b/ci/build_docs.sh index 0b1ea2329636d..e29b0d21d7d97 100755 --- a/ci/build_docs.sh +++ b/ci/build_docs.sh @@ -25,28 +25,30 @@ if [ "$DOC" ]; then echo # Create and send docs # echo ######################## - cd build/html - git config --global user.email "pandas-docs-bot@localhost.foo" - 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 + if ["${TRAVIS_PULL_REQUEST}" != "false"]; then + cd build/html + git config --global user.email "pandas-docs-bot@localhost.foo" + 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 From 75f14345c9917a8c78ad4cdff76999d4acb5490a Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Mon, 17 Dec 2018 01:38:31 +0000 Subject: [PATCH 2/2] Fixing typos and adding info about uploading the docs --- ci/build_docs.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ci/build_docs.sh b/ci/build_docs.sh index e29b0d21d7d97..fbb27286e9566 100755 --- a/ci/build_docs.sh +++ b/ci/build_docs.sh @@ -25,7 +25,10 @@ if [ "$DOC" ]; then echo # Create and send docs # echo ######################## - if ["${TRAVIS_PULL_REQUEST}" != "false"]; then + 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 "pandas-docs-bot@localhost.foo" git config --global user.name "pandas-docs-bot"