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

Skip to content

Commit 42c01e4

Browse files
committed
ci: Re-add documentation deploy script on CircleCI.
1 parent 1df513f commit 42c01e4

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

.circleci/config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ jobs:
9898
name: "Built documentation is available at:"
9999
command: echo "${CIRCLE_BUILD_URL}/artifacts/${CIRCLE_NODE_INDEX}/${CIRCLE_WORKING_DIRECTORY/#\~/$HOME}/doc/build/html/index.html"
100100

101+
- deploy:
102+
name: "Deploy new docs"
103+
command: ./.circleci/deploy-docs.sh
104+
101105
docs-python27:
102106
docker:
103107
- image: circleci/python:2.7

.circleci/deploy-docs.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
if [ "$CIRCLE_BRANCH" != "master" -o "$CIRCLE_PULL_REQUEST" != "" ]; then
6+
# Upload docs only on master.
7+
exit
8+
fi
9+
10+
git clone [email protected]:matplotlib/devdocs.git
11+
12+
cd devdocs
13+
14+
git checkout --orphan gh-pages || true
15+
git reset --hard first_commit
16+
17+
cp -R ../doc/build/html/* .
18+
touch .nojekyll
19+
20+
git config user.email "MatplotlibCircleBot@nomail"
21+
git config user.name "MatplotlibCircleBot"
22+
git config push.default simple
23+
24+
git add .
25+
git commit -m "Docs build of $CIRCLE_SHA1"
26+
27+
git push --set-upstream origin gh-pages --force

0 commit comments

Comments
 (0)