DOC: Only build and upload docs if we need to.
Merge pull request #1447 from jseabold/conditional-docs-build

DOC: Only build and upload docs if we need to.