Add command to exit on error(build_doc.sh)

It is important to exit on error and not delete all the doc files and push an empty dev folder.