Pi66

git.pi66.xyz
A web interface for the pi66.xyz Git server
git clone https://git.pi66.xyz/git.pi66.xyz

← back to log

fix: sync static files to release directory

author: pi66
date: 2026-07-22 16:55
hash: d689978849aedda373fddf9e2c5195316224e395

Diffstat:

M

src/plugins/main.py
4 +++++++++++++++---------------
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
diff --git a/src/plugins/main.py b/src/plugins/main.py
index 0808f82..5bc92b5 100644
--- a/src/plugins/main.py
+++ b/src/plugins/main.py
@@ -54,12 +54,12 @@ def inject_repos(md_file, md_content):
 @hook("on_file_changed")
 def on_file_changed_hook(changed_path, config):
     if changed_path.startswith(config.tree.static) and api.mode == "release":
-        subprocess.run(["rsync", "-a", "/srv/git/git.pi66.xyz/build/static/", "/srv/www/git.pi66.xyz/public/static/"])
+        subprocess.run(["rsync", "-a", api.config.tree.static, os.path.join(os.path.dirname(api.config.tree.release_dest),"static") ])

 @hook("on_end")
 def sync_static():
     if api.mode == "release":
-        subprocess.run(["rsync", "-a", "/srv/git/git.pi66.xyz/build/static/", "/srv/www/git.pi66.xyz/public/static/"])
+        subprocess.run(["rsync", "-a", api.config.tree.static, os.path.join(os.path.dirname(api.config.tree.release_dest),"static") ])

 @hook("on_build_end")
 def build_pages(_):