diff options
Diffstat (limited to 'deploy.py')
-rw-r--r-- | deploy.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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() |