aboutsummaryrefslogtreecommitdiff
path: root/build.py
diff options
context:
space:
mode:
Diffstat (limited to 'build.py')
-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,