cmc/cleberg.net

My personal web garden & blog.

clone: git clone https://gitbay.org/cmc/cleberg.net.git

7159f3c1bfc61ef36f3dc60396a155280cbfa536

verified · cmc

author: Christian Cleberg <hello@cleberg.net> · 2026-03-23T16:24:44Z

attempt to fix builds
 .build.yml |  6 +++++-
 build.py   | 29 +++++++++++------------------
 publish.el |  3 +++
 3 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/.build.yml b/.build.yml
index 4a91927..302a7e9 100644
--- a/.build.yml
+++ b/.build.yml
@@ -4,6 +4,9 @@ packages:
   - emacs-nox
   - rsync
   - openssh-client
+  - git
+  - curl
+  - tar
 
 sources:
   - https://git.sr.ht/~ccleberg/cleberg.net
@@ -18,6 +21,7 @@ environment:
 tasks:
   - setup: |
       curl -LsSf https://astral.sh/uv/install.sh | sh
+      mkdir -p ~/.local/bin
       curl -sSfL https://github.com/tdewolff/minify/releases/latest/download/minify_linux_amd64.tar.gz \
         | tar -xz -C ~/.local/bin minify
       mkdir -p ~/.config/emacs/.local/straight/repos
@@ -30,7 +34,7 @@ tasks:
   - build: |
       source ~/.local/bin/env
       cd cleberg.net
-      uv run build.py
+      uv run python3 -u build.py
   - deploy: |
       cd cleberg.net
       chmod 600 ~/.ssh/id_rsa
diff --git a/build.py b/build.py
index 8421ed3..fdcbf9d 100644
--- a/build.py
+++ b/build.py
@@ -247,26 +247,19 @@ def minify_html(src_html, dest_html):
 
 
 def run_emacs_publish(dev_mode=True):
-    if dev_mode:
-        print("Running Emacs publish script (development)...")
-        result = subprocess.run(
-            ["emacs", "--script", "publish.el"],
-            stdout=subprocess.PIPE,
-            stderr=subprocess.PIPE,
-            text=True,
-        )
-    else:
-        print("Running Emacs publish script (production)...")
-        result = subprocess.run(
-            ["emacs", "--script", "publish.el"],
-            stdout=subprocess.DEVNULL,
-            stderr=subprocess.DEVNULL,
-            text=True,
-        )
+    mode = "development" if dev_mode else "production"
+    print(f"Running Emacs publish script ({mode})...")
+
+    result = subprocess.run(
+        ["emacs", "--script", "publish.el"],
+        stdout=subprocess.PIPE,
+        stderr=subprocess.STDOUT,
+        text=True,
+    )
 
     if result.returncode != 0:
-        print("Error running publish.el:")
-        print(result.stderr, file=sys.stderr)
+        print("Error running publish.el output:")
+        print(result.stdout)
         sys.exit(1)
 
     annoying_file = Path(".build/cleberg-net.html")
diff --git a/publish.el b/publish.el
index cf11664..026103c 100644
--- a/publish.el
+++ b/publish.el
@@ -1,4 +1,6 @@
 ;;; -*- lexical-binding: t -*-
+(setq debug-on-error t)
+
 ;; Allow for macOS (dev machine) & Linux (GitHub Actions) execution
 (defvar site-lisp-base
   (expand-file-name "~/.config/emacs/.local/straight/repos"))
@@ -9,6 +11,7 @@
 (add-to-list 'load-path (expand-file-name "templatel" site-lisp-base))
 
 (require 'htmlize)
+(require 'templatel)
 (require 'weblorg)
 
 ;; Set default URL for Weblorg