File: deploy-docs.sh

package info (click to toggle)
matplotlib 3.10.1%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 78,352 kB
  • sloc: python: 147,118; cpp: 62,988; objc: 1,679; ansic: 1,426; javascript: 786; makefile: 104; sh: 53
file content (33 lines) | stat: -rwxr-xr-x 862 bytes parent folder | download | duplicates (2)
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 git@github.com: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