From 5be4598b09a2685d73665b403bf80aad50b15834 Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Tue, 11 Aug 2026 19:26:42 -0500 Subject: 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. --- build.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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, -- cgit v1.2.3