Skip to content

Commit

Permalink
First step in upload of docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jenshnielsen committed Dec 27, 2014
1 parent 8301087 commit b97fa1b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .travis.yml
Expand Up @@ -22,6 +22,9 @@ matrix:
- python: 2.7
env: BUILD_DOCS=true

before_install:
- openssl aes-256-cbc -K $encrypted_cc802e084cd0_key -iv $encrypted_cc802e084cd0_iv -in .travis/matplotlibDeployKey.enc -out .travis/matplotlibDeployKey -d

install:
- pip install -q --use-mirrors nose python-dateutil $NUMPY pep8 pyparsing pillow
- sudo apt-get update && sudo apt-get -qq install inkscape libav-tools gdb
Expand Down Expand Up @@ -53,3 +56,27 @@ after_failure:
- if [[ $TRAVIS_PULL_REQUEST == false ]]; then gem install travis-artifacts; fi
- if [[ $TRAVIS_PULL_REQUEST == false ]]; then travis-artifacts upload --path result_images.tar.bz2; fi
- if [[ $TRAVIS_PULL_REQUEST != false ]]; then echo "The result images will only be uploaded if they are on the matplotlib/matplotlib repo - this is for security reasons to prevent arbitrary PRs echoing security details." else echo https://s3.amazonaws.com/matplotlib-test-results/artifacts/${TRAVIS_BUILD_NUMBER}/${TRAVIS_JOB_NUMBER}/result_images.tar.bz2; fi

after_success:
|
if [[ $TRAVIS_PULL_REQUEST == false && $BUILD_DOCS == true && $TRAVIS_BRANCH == 'master' ]]; then
echo "Uploading documentation"
cd ..
eval `ssh-agent -s`
chmod 600 .travis/matplotlibDeployKey
ssh-add .travis/matplotlibDeployKey
cd ..
git clone git@github.com:jenshnielsen/mplddocs.git
cd mplddocs
git checkout --orphan gh-pages
cp -R ../matplotlib/doc/build/html/. .
touch .nojekyll
git config --global user.email "MatplotlibTravisBot@nomail"
git config --global user.name "MatplotlibTravisBot"
git config --global push.default simple
git add .
git commit -m "Docs build of $TRAVIS_COMMIT"
git push --set-upstream origin gh-pages --force
else
echo "Will only build docs on master branch"
fi
Binary file added .travis/matplotlibDeployKey.enc
Binary file not shown.

0 comments on commit b97fa1b

Please sign in to comment.