def publish_pages(name, paths, git_repo, published_repo, extra_message='<STR_LIT>'):
version = last_modified_commit(*paths)<EOL>checkout_dir = '<STR_LIT>'.format(name, version)<EOL>check_call([<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>git_remote(git_repo), checkout_dir],<EOL>echo=False,<EOL>)<EOL>check_call(['<STR_LIT>', '<STR_LIT>', '<STR_LIT>'], cwd=checkout_dir)<EOL>with TemporaryDirectory() as td:<EOL><INDENT>check_call([<EOL>'<STR_LIT>', '<STR_LIT>', name,<EOL>'<STR_LIT>', td + '<STR_LIT:/>',<EOL>])<EOL>check_call([<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT:index>', td,<EOL>'<STR_LIT>', published_repo,<EOL>'<STR_LIT>', os.path.join(checkout_dir, '<STR_LIT>'),<EOL>])<EOL>for f in os.listdir(td):<EOL><INDENT>shutil.copy2(<EOL>os.path.join(td, f),<EOL>os.path.join(checkout_dir, f)<EOL>)<EOL><DEDENT><DEDENT>check_call(['<STR_LIT>', '<STR_LIT>', '<STR_LIT:.>'], cwd=checkout_dir)<EOL>if extra_message:<EOL><INDENT>extra_message = '<STR_LIT>' % extra_message<EOL><DEDENT>else:<EOL><INDENT>extra_message = '<STR_LIT>'<EOL><DEDENT>check_call([<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>'.format(name, version, extra_message)<EOL>], cwd=checkout_dir)<EOL>check_call(<EOL>['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>'],<EOL>cwd=checkout_dir,<EOL>)<EOL>
Publish helm chart index to github pages