aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-08-11 19:26:42 -0500
committerChristian Cleberg <[email protected]>2026-08-11 19:26:42 -0500
commit5be4598b09a2685d73665b403bf80aad50b15834 (patch)
tree42f69bf5b42f437f94067973ac9ca5ab47071069
parentd10ca60103b924b6d182e09123af6ba4a5fffc77 (diff)
downloadcleberg.net-5be4598b09a2685d73665b403bf80aad50b15834.tar.gz
cleberg.net-5be4598b09a2685d73665b403bf80aad50b15834.tar.bz2
cleberg.net-5be4598b09a2685d73665b403bf80aad50b15834.zip
Keep the build cache out of the deploy
.orgo-cache.json lives in the output directory because it describes that directory, and the first orgo deploy put it on the server. Excluding it from rsync stops that, and stops --delete removing it locally between builds. The copy the first deploy left behind is gone from the server.
-rwxr-xr-xbuild.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/build.py b/build.py
index 3bfc8fb..0d90e2b 100755
--- a/build.py
+++ b/build.py
@@ -369,7 +369,17 @@ def deploy_to_server(build_dir, server):
remote_path = f"{server}:/var/www/cleberg.net/"
print(f"Deploying .build/ → {remote_path}")
result = subprocess.run(
- ["rsync", "-r", "--delete-before", f"{build_dir}/", remote_path],
+ # The build cache lives in the output directory because it describes it, but it
+ # is not part of the site. Excluding it also stops --delete removing it locally.
+ [
+ "rsync",
+ "-r",
+ "--delete-before",
+ "--exclude",
+ ".orgo-cache.json",
+ f"{build_dir}/",
+ remote_path,
+ ],
capture_output=True,
text=True,
check=False,