- subprocess.run(["git", "pull"], cwd=WORKING_REPO, env=our_env)
+
+ for git_cmd in [["git", "fetch", "origin"],
+ ["git", "reset", "--hard", "origin/master"]]:
+ subprocess.run(git_cmd, cwd=WORKING_REPO, env=our_env)
+
+ # sitegen now! (even if there are no posts to queue, we can at least update
+ # /drafts/) and make any back-edits to published posts live
+ subprocess.run(SITEGEN_COMMAND,
+ # XXX: `shell=True` is contrary to the moral law
+ shell=True)