X-Git-Url: http://unremediatedgender.space/source?p=Ultimately_Untrue_Thought.git;a=blobdiff_plain;f=provisioning%2Fpelican_scheduler.py;fp=provisioning%2Fpelican_scheduler.py;h=c58a036d62e7ca6b972a5fb557429d1efa7a40ae;hp=87012274de8d75415cb7658b42afacccc98f9cb9;hb=4021e69f4d08f04b6712203cf2e189884b9c0ed6;hpb=ffa3970722fcf13bec9f3b4b84fe6d3c90dc1b53 diff --git a/provisioning/pelican_scheduler.py b/provisioning/pelican_scheduler.py index 8701227..c58a036 100755 --- a/provisioning/pelican_scheduler.py +++ b/provisioning/pelican_scheduler.py @@ -67,7 +67,14 @@ def main(): # repo confuse us our_env = os.environ.copy() del our_env['GIT_DIR'] - 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) # look for scheduled future posts future_publication_times = get_future_publication_times()