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

Skip to content

Commit 2dacc6c

Browse files
committed
Include analytics on devdocs also.
1 parent 1370be8 commit 2dacc6c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.circleci/config.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,15 @@ commands:
8787
command: |
8888
# Set epoch to date of latest tag.
8989
export SOURCE_DATE_EPOCH="$(git log -1 --format=%at $(git describe --abbrev=0))"
90-
make html O=-T
90+
# Include analytics only when deploying to devdocs.
91+
if [ "$CIRCLE_PROJECT_USERNAME" != "matplotlib" ] || \
92+
[ "$CIRCLE_BRANCH" != "master" ] || \
93+
[[ "$CIRCLE_PULL_REQUEST" == https://github.com/matplotlib/matplotlib/pull/* ]]; then
94+
export ANALYTICS=False
95+
else
96+
export ANALYTICS=True
97+
fi
98+
make html O="-T -Ainclude_analytics=$ANALYTICS"
9199
rm -r build/html/_sources
92100
working_directory: doc
93101
- save_cache:

0 commit comments

Comments
 (0)