summaryrefslogtreecommitdiff
path: root/deploy.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2023-03-19 15:27:45 +0100
committerjaseg <git@jaseg.de>2023-03-19 15:27:45 +0100
commit77469be23fe1777d776c0b0abd4c77f6e4080196 (patch)
treeb7fe0fbfb7c688837d491af89101d85614447ccf /deploy.py
parent92e3b5f49f6f5336530988e7839ab3ed283b86e4 (diff)
downloadblog-77469be23fe1777d776c0b0abd4c77f6e4080196.tar.gz
blog-77469be23fe1777d776c0b0abd4c77f6e4080196.tar.bz2
blog-77469be23fe1777d776c0b0abd4c77f6e4080196.zip
Make site mobile-friendly, make code listings pretty
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()