-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Expand file tree
/
Copy pathdeploy-docs.sh
More file actions
executable file
·33 lines (24 loc) · 862 Bytes
/
deploy-docs.sh
File metadata and controls
executable file
·33 lines (24 loc) · 862 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
set -e
if [ "$CIRCLE_PROJECT_USERNAME" != "matplotlib" ] || \
[ "$CIRCLE_BRANCH" != "main" ] || \
[[ "$CIRCLE_PULL_REQUEST" == https://github.com/matplotlib/matplotlib/pull/* ]]; then
echo "Not uploading docs for ${CIRCLE_SHA1}"\
"from non-main branch (${CIRCLE_BRANCH})"\
"or pull request (${CIRCLE_PULL_REQUEST})"\
"or non-Matplotlib org (${CIRCLE_PROJECT_USERNAME})."
exit
fi
git clone [email protected]:matplotlib/devdocs.git
cd devdocs
git checkout --orphan gh-pages || true
git reset --hard first_commit
git rm -rf .
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