deploy.py: copy the compiled file to my site repo instead
- ID
0bc2fdf- date
2026-08-10 03:32:18+00:00- author
Alex Chan <alex@alexwlchan.net>- parent
4502cbc- message
deploy.py: copy the compiled file to my site repo instead- changed files
1 file, 5 additions, 14 deletions
Changed files
deploy.py (1211 → 947)
diff --git a/deploy.py b/deploy.py
index 5670583..8e6ae06 100755
--- a/deploy.py
+++ b/deploy.py
@@ -8,7 +8,7 @@ This script builds and deploys the app to my web server, which means:
"""
from pathlib import Path
-import subprocess
+import shutil
if __name__ == "__main__":
@@ -28,17 +28,8 @@ if __name__ == "__main__":
(out_dir / "index.html").write_text(html)
- subprocess.check_call(
- [
- "ssh",
- "alexwlchan@alexwlchan.net",
- "mkdir -p repos/alexwlchan.net/_site/my-tools/add-cover-to-ao3-epubs",
- ]
- )
- subprocess.check_call(
- [
- "scp",
- str(out_dir / "index.html"),
- "alexwlchan@alexwlchan.net:repos/alexwlchan.net/_site/my-tools/add-cover-to-ao3-epubs/index.html",
- ]
+ shutil.copyfile(
+ out_dir / "index.html",
+ Path.home()
+ / "repos/alexwlchan.net/src/my-tools/add-cover-to-ao3-epubs/index.html",
)