diff options
| author | Christian Cleberg <[email protected]> | 2026-08-11 19:26:42 -0500 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2026-08-11 19:26:42 -0500 |
| commit | 5be4598b09a2685d73665b403bf80aad50b15834 (patch) | |
| tree | 42f69bf5b42f437f94067973ac9ca5ab47071069 | |
| parent | d10ca60103b924b6d182e09123af6ba4a5fffc77 (diff) | |
| download | cleberg.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-x | build.py | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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, |
