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: |
| 4 | 4 | - emacs-nox |
| 5 | 5 | - rsync |
| 6 | 6 | - openssh-client |
| 7 | - git |
| 8 | - curl |
| 9 | - tar |
| 7 | 10 | |
| 8 | 11 | sources: |
| 9 | 12 | - https://git.sr.ht/~ccleberg/cleberg.net |
| @@ -18,6 +21,7 @@ environment: |
| 18 | 21 | tasks: |
| 19 | 22 | - setup: | |
| 20 | 23 | curl -LsSf https://astral.sh/uv/install.sh | sh |
| 24 | mkdir -p ~/.local/bin |
| 21 | 25 | curl -sSfL https://github.com/tdewolff/minify/releases/latest/download/minify_linux_amd64.tar.gz \ |
| 22 | 26 | | tar -xz -C ~/.local/bin minify |
| 23 | 27 | mkdir -p ~/.config/emacs/.local/straight/repos |
| @@ -30,7 +34,7 @@ tasks: |
| 30 | 34 | - build: | |
| 31 | 35 | source ~/.local/bin/env |
| 32 | 36 | cd cleberg.net |
| 33 | | uv run build.py |
| 37 | uv run python3 -u build.py |
| 34 | 38 | - deploy: | |
| 35 | 39 | cd cleberg.net |
| 36 | 40 | chmod 600 ~/.ssh/id_rsa |
build.py
+11 −18
| @@ -247,26 +247,19 @@ def minify_html(src_html, dest_html): |
| 247 | 247 | |
| 248 | 248 | |
| 249 | 249 | def 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 | ) |
| 266 | 259 | |
| 267 | 260 | 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) |
| 270 | 263 | sys.exit(1) |
| 271 | 264 | |
| 272 | 265 | annoying_file = Path(".build/cleberg-net.html") |
publish.el
+3
| @@ -1,4 +1,6 @@ |
| 1 | 1 | ;;; -*- lexical-binding: t -*- |
| 2 | (setq debug-on-error t) |
| 3 | |
| 2 | 4 | ;; Allow for macOS (dev machine) & Linux (GitHub Actions) execution |
| 3 | 5 | (defvar site-lisp-base |
| 4 | 6 | (expand-file-name "~/.config/emacs/.local/straight/repos")) |
| @@ -9,6 +11,7 @@ |
| 9 | 11 | (add-to-list 'load-path (expand-file-name "templatel" site-lisp-base)) |
| 10 | 12 | |
| 11 | 13 | (require 'htmlize) |
| 14 | (require 'templatel) |
| 12 | 15 | (require 'weblorg) |
| 13 | 16 | |
| 14 | 17 | ;; Set default URL for Weblorg |