Commit 7159f3c1bf

7159f3c1bfc61ef36f3dc60396a155280cbfa536

parent: bf27b6228f

Verified · cmc

cmc <hello@cleberg.net> · 2026-03-23 16:24 UTC

attempt to fix builds

Layout: unified · split

.build.yml +5 −1
@@ -4,6 +4,9 @@ packages:
44 - emacs-nox
55 - rsync
66 - openssh-client
7 - git
8 - curl
9 - tar
710
811sources:
912 - https://git.sr.ht/~ccleberg/cleberg.net
@@ -18,6 +21,7 @@ environment:
1821tasks:
1922 - setup: |
2023 curl -LsSf https://astral.sh/uv/install.sh | sh
24 mkdir -p ~/.local/bin
2125 curl -sSfL https://github.com/tdewolff/minify/releases/latest/download/minify_linux_amd64.tar.gz \
2226 | tar -xz -C ~/.local/bin minify
2327 mkdir -p ~/.config/emacs/.local/straight/repos
@@ -30,7 +34,7 @@ tasks:
3034 - build: |
3135 source ~/.local/bin/env
3236 cd cleberg.net
33 uv run build.py
37 uv run python3 -u build.py
3438 - deploy: |
3539 cd cleberg.net
3640 chmod 600 ~/.ssh/id_rsa
build.py +11 −18
@@ -247,26 +247,19 @@ def minify_html(src_html, dest_html):
247247
248248
249249def run_emacs_publish(dev_mode=True):
250 if dev_mode:
251 print("Running Emacs publish script (development)...")
252 result = subprocess.run(
253 ["emacs", "--script", "publish.el"],
254 stdout=subprocess.PIPE,
255 stderr=subprocess.PIPE,
256 text=True,
257 )
258 else:
259 print("Running Emacs publish script (production)...")
260 result = subprocess.run(
261 ["emacs", "--script", "publish.el"],
262 stdout=subprocess.DEVNULL,
263 stderr=subprocess.DEVNULL,
264 text=True,
265 )
250 mode = "development" if dev_mode else "production"
251 print(f"Running Emacs publish script ({mode})...")
252
253 result = subprocess.run(
254 ["emacs", "--script", "publish.el"],
255 stdout=subprocess.PIPE,
256 stderr=subprocess.STDOUT,
257 text=True,
258 )
266259
267260 if result.returncode != 0:
268 print("Error running publish.el:")
269 print(result.stderr, file=sys.stderr)
261 print("Error running publish.el output:")
262 print(result.stdout)
270263 sys.exit(1)
271264
272265 annoying_file = Path(".build/cleberg-net.html")
publish.el +3
@@ -1,4 +1,6 @@
11;;; -*- lexical-binding: t -*-
2(setq debug-on-error t)
3
24;; Allow for macOS (dev machine) & Linux (GitHub Actions) execution
35(defvar site-lisp-base
46 (expand-file-name "~/.config/emacs/.local/straight/repos"))
@@ -9,6 +11,7 @@
911(add-to-list 'load-path (expand-file-name "templatel" site-lisp-base))
1012
1113(require 'htmlize)
14(require 'templatel)
1215(require 'weblorg)
1316
1417;; Set default URL for Weblorg