summaryrefslogtreecommitdiff
path: root/deploy.py
diff options
context:
space:
mode:
Diffstat (limited to 'deploy.py')
-rw-r--r--deploy.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/deploy.py b/deploy.py
index b0e87ca..d8a99c1 100644
--- a/deploy.py
+++ b/deploy.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
+import os
import tempfile
import subprocess
from pathlib import Path
@@ -13,7 +14,9 @@ if __name__ == '__main__':
subprocess.run(['git', 'worktree', 'add', '--detach', tmpdir], check=True)
try:
- subprocess.run(['hugo'], cwd=tmpdir, check=True)
+ env = dict(os.environ())
+ env['PATH'] = Path('hack').absolute() + ':' + env['PATH']
+ subprocess.run(['hugo'], cwd=tmpdir, check=True, env=env)
subprocess.run(['git', 'add', '--force', 'public'], cwd=tmpdir, check=True)
write_tree = subprocess.run(['git', 'write-tree', '--prefix=public/'], cwd=tmpdir, check=True, capture_output=True)
tree = write_tree.stdout.strip()