'Formats Halyard\'s documentation, then pushes to Spinnaker\'s documentation repository.'

def __publish_halyard_docs(self):

    docs_source = 'halyard/docs/commands.md'
    docs_target = '{repo_name}/reference/halyard/commands.md'.format(repo_name=self.__docs_repo_name)
    repo_uri = 'git@github.com:{repo_owner}/{repo_name}'.format(repo_owner=self.__docs_repo_owner, repo_name=self.__docs_repo_name)
    check_run_quick('git    clone    {repo_uri}'.format(repo_uri=repo_uri))
    with open(docs_source, 'r') as source:
        with open(docs_target, 'w') as target:
            header = '\n'.join(['---', 'layout:    single', 'title:        "Commands"', 'sidebar:', '        nav:    reference', '---', '', 'Published:    {}'.format(datetime.datetime.utcnow().strftime('%Y-%m-%d    %H:%M:%S')), ''])
            target.write((header + source.read()))
    commit_message = 'docs(halyard):    {version}'.format(version=self.__stable_version)
    check_run_quick('git    -C    {repo_name}    add    reference/halyard/commands.md'.format(repo_name=self.__docs_repo_name))
    check_run_quick('git    -C    {repo_name}    commit    -m    "{message}"'.format(repo_name=self.__docs_repo_name, message=commit_message))
    check_run_quick('git    -C    {repo_name}    push    origin    master'.format(repo_name=self.__docs_repo_name))
