Skip to content

Commit decb73f

Browse files
committed
Upload docs to repository on github.
Following successful build from github
1 parent 8301087 commit decb73f

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

.travis.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ matrix:
2222
- python: 2.7
2323
env: BUILD_DOCS=true
2424

25+
before_install:
26+
- openssl aes-256-cbc -K $encrypted_cc802e084cd0_key -iv $encrypted_cc802e084cd0_iv -in .travis/matplotlibDeployKey.enc -out .travis/matplotlibDeployKey -d
27+
2528
install:
2629
- pip install -q --use-mirrors nose python-dateutil $NUMPY pep8 pyparsing pillow
2730
- sudo apt-get update && sudo apt-get -qq install inkscape libav-tools gdb
@@ -53,3 +56,27 @@ after_failure:
5356
- if [[ $TRAVIS_PULL_REQUEST == false ]]; then gem install travis-artifacts; fi
5457
- if [[ $TRAVIS_PULL_REQUEST == false ]]; then travis-artifacts upload --path result_images.tar.bz2; fi
5558
- 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
59+
60+
after_success:
61+
|
62+
if [[ $TRAVIS_PULL_REQUEST == false && $BUILD_DOCS == true && $TRAVIS_BRANCH == 'master' ]]; then
63+
echo "Uploading documentation"
64+
cd ..
65+
eval `ssh-agent -s`
66+
chmod 600 .travis/matplotlibDeployKey
67+
ssh-add .travis/matplotlibDeployKey
68+
cd ..
69+
git clone git@github.com:matplotlib/devdocs.git
70+
cd mplddocs
71+
git checkout --orphan gh-pages
72+
cp -R ../matplotlib/doc/build/html/. .
73+
touch .nojekyll
74+
git config --global user.email "MatplotlibTravisBot@nomail"
75+
git config --global user.name "MatplotlibTravisBot"
76+
git config --global push.default simple
77+
git add .
78+
git commit -m "Docs build of $TRAVIS_COMMIT"
79+
git push --set-upstream origin gh-pages --force
80+
else
81+
echo "Will only build docs on master branch"
82+
fi

.travis/matplotlibDeployKey.enc

1.64 KB
Binary file not shown.

0 commit comments

Comments
 (0)