Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Build docs with Circle CI #8893

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 14 commits into from
Jul 21, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
ci: Re-add documentation deploy script on CircleCI.
  • Loading branch information
QuLogic committed Jul 20, 2017
commit a080f2bf28c0fae11b69917f23ef61e9acebb1fd
4 changes: 4 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ jobs:
name: "Built documentation is available at:"
command: echo "${CIRCLE_BUILD_URL}/artifacts/${CIRCLE_NODE_INDEX}/${CIRCLE_WORKING_DIRECTORY/#\~/$HOME}/doc/build/html/index.html"

- deploy:
name: "Deploy new docs"
command: ./.circleci/deploy-docs.sh

docs-python27:
docker:
- image: circleci/python:2.7
Expand Down
27 changes: 27 additions & 0 deletions .circleci/deploy-docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

set -e

if [ "$CIRCLE_BRANCH" != "master" -o "$CIRCLE_PULL_REQUEST" != "" ]; then
echo "Not uploading docs from non-master branch."
exit
fi

git clone [email protected]:matplotlib/devdocs.git

cd devdocs

git checkout --orphan gh-pages || true
git reset --hard first_commit

cp -R ../doc/build/html/* .
touch .nojekyll

git config user.email "MatplotlibCircleBot@nomail"
git config user.name "MatplotlibCircleBot"
git config push.default simple

git add .
git commit -m "Docs build of $CIRCLE_SHA1"

git push --set-upstream origin gh-pages --force