I guess that each command creates its own shell, just like make does.
Try merging it into a single, ugly, line
cd $READTHEDOCS_OUTPUT/; pwd; ls -lt; cmake ..; make html; exit 0