def deploy(self, environment, target_name, stream_output=None):
try:<EOL><INDENT>remote_server_command(<EOL>[<EOL>"<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>",<EOL>"<STR_LIT>", "<STR_LIT>", "<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>environment.deploy_target + '<STR_LIT::>' + target_name<EOL>],<EOL>environment, self,<EOL>include_project_dir=True,<EOL>stream_output=stream_output,<EOL>clean_up=True,<EOL>)<EOL><DEDENT>except WebCommandError as e:<EOL><INDENT>raise DatacatsError(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>.format((target_name,)),<EOL>parent_exception=e<EOL>)<EOL><DEDENT>try:<EOL><INDENT>remote_server_command(<EOL>[<EOL>"<STR_LIT>", environment.deploy_target, "<STR_LIT>", target_name,<EOL>],<EOL>environment, self,<EOL>clean_up=True,<EOL>)<EOL>return True<EOL><DEDENT>except WebCommandError as e:<EOL><INDENT>raise DatacatsError(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>.format((target_name,)),<EOL>parent_exception=e<EOL>)<EOL><DEDENT>
Return True if deployment was successful