Travis-cargo does not support uploading docs from a tag
diff --git a/.travis.yml b/.travis.yml
index b8e9395..a79807f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -59,7 +59,7 @@
 
 after_success:
   - |
-      if [ "$ROLE" = build ] && [ -n "$TRAVIS_TAG" ] && rustc --version | grep -q nightly; then
+      if [ "$ROLE" = build ] && [ "$TRAVIS_RUST_VERSION" = nightly ]; then
         travis-cargo doc-upload
       fi