diff --git a/.travis.yml b/.travis.yml
index 98fe735a7ca39836a12fa984702217d6d2330b04..2ff3a241c3b2a730877d2ab4f03b3f7c9f2ac798 100755
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,30 +11,24 @@ install:
   - pip install sphinx
 
 script:
-  - ls
-  # - python setup.py test
-#  - cd docs && rm source/convlab2.*.rst
-#  - sphinx-apidoc -o ./source ../convlab2/
-#  - cd source && python gen_rst.py --project convlab2 && cd ..
-#  - make html
-#  - cd source
-#  - python modify_py_modindex.py -d ../build/html/
-#  - cd ..
-#  - mv ./build/html ./build/docs && rm -r ./build/doctrees && mv LICENSE.txt ./build && mv README.md ./build && cd ..
-  
-#deploy:
-#  - provider: pages
-#    skip-cleanup: true
-#    github-token: $DEPLOY_KEY
-#    keep-history: true
-#    repo: thu-coai/convlab2_docs
-#    target-branch: master
-#    local-dir: ./docs/build
-#    on:
-#      branch: master
-#  - provider: script
-#    skip-cleanup: true
-#    script: coveralls
-#    on:
-#      all_branches: true
-#      condition: true
+  - pytest tests
+  - cd docs
+  - make html && mv ./build/html ./build/docs && rm -r ./build/doctrees
+  - cd ..
+
+deploy:
+  - provider: pages
+    skip-cleanup: true
+    github-token: $DEPLOY_KEY
+    keep-history: true
+    repo: thu-coai/ConvLab-2_docs
+    target-branch: master
+    local-dir: ./docs/build
+    on:
+      branch: master
+  - provider: script
+    skip-cleanup: true
+    script: coveralls
+    on:
+      all_branches: true
+      condition: true