Commit 8780e8761d

8780e8761da6b1eec5d686a25c9f673c22d974c6

parent: 3028f0d7da

Verified · cmc

cmc <hello@cleberg.net> · 2026-08-02 23:14 UTC

add pre-push deploy hook; source links to git.krz.sh; fix app button color

- pre-push hook builds with zola and rsyncs public/ to homelab on main
- wire core.hooksPath to tracked .githooks/
- point app source links at git.krz.sh instead of github
- keep .prose btn text at --text/--btn-fg instead of link blue
- drop dead github pages workflow (remote is self-hosted git now)

Layout: unified · split

.githooks/pre-push added +28
@@ -0,0 +1,28 @@
1#!/usr/bin/env bash
2# Build with zola and deploy public/ to homelab on push to main.
3set -euo pipefail
4
5remote_host="homelab"
6remote_path="/var/www/krz.sh"
7
8# pre-push feeds "<local ref> <local sha> <remote ref> <remote sha>" per line.
9# Only deploy when main is being pushed (and not deleted).
10zero="0000000000000000000000000000000000000000"
11deploy=0
12while read -r local_ref local_sha remote_ref remote_sha; do
13 if [ "$remote_ref" = "refs/heads/main" ] && [ "$local_sha" != "$zero" ]; then
14 deploy=1
15 fi
16done
17
18if [ "$deploy" -eq 0 ]; then
19 exit 0
20fi
21
22echo "pre-push: building site with zola..."
23zola build
24
25echo "pre-push: deploying to ${remote_host}:${remote_path}..."
26rsync -az --delete public/ "${remote_host}:${remote_path}/"
27
28echo "pre-push: deploy complete."
.github/workflows/deploy.yml deleted −39
@@ -1,39 +0,0 @@
1name: Deploy to GitHub Pages
2
3on:
4 push:
5 branches: [main]
6 workflow_dispatch:
7
8permissions:
9 contents: read
10 pages: write
11 id-token: write
12
13concurrency:
14 group: pages
15 cancel-in-progress: true
16
17jobs:
18 build:
19 runs-on: ubuntu-latest
20 steps:
21 - uses: actions/checkout@v4
22 - name: Build with Zola
23 uses: shalzz/zola-deploy-action@master
24 env:
25 BUILD_ONLY: true
26 BUILD_DIR: .
27 - uses: actions/upload-pages-artifact@v3
28 with:
29 path: public
30
31 deploy:
32 needs: build
33 runs-on: ubuntu-latest
34 environment:
35 name: github-pages
36 url: ${{ steps.deployment.outputs.page_url }}
37 steps:
38 - id: deployment
39 uses: actions/deploy-pages@v4
content/apps/_index.md +1 −1
@@ -7,4 +7,4 @@ page_template = "page.html"
7+++ 7+++
8 8
9Native apps and privacy-respecting frontends. Each one is small, focused, and 9Native apps and privacy-respecting frontends. Each one is small, focused, and
10built to last. Source is on [GitHub](https://github.com/krazywarez). 10built to last. Source is at [git.krz.sh](https://git.krz.sh).
content/apps/daybyday.md +1 −1
@@ -4,7 +4,7 @@ description = "An educational iOS app that helps children learn the calendar."
4weight = 5 4weight = 5
5 5
6[extra] 6[extra]
7link = "https://github.com/krazywarez/daybyday" 7link = "https://git.krz.sh/daybyday"
8link_label = "Source" 8link_label = "Source"
9appstore = "https://apps.apple.com/us/app/daybyday-learn/id6760321939" 9appstore = "https://apps.apple.com/us/app/daybyday-learn/id6760321939"
10privacy = "/privacy/daybyday/" 10privacy = "/privacy/daybyday/"
content/apps/domain-dig.md +1 −1
@@ -4,7 +4,7 @@ description = "DNS and SSL analysis, in your pocket."
4weight = 2 4weight = 2
5 5
6[extra] 6[extra]
7link = "https://github.com/krazywarez/domain-dig" 7link = "https://git.krz.sh/domain-dig"
8link_label = "Source" 8link_label = "Source"
9appstore = "https://apps.apple.com/us/app/domaindig/id6760368004" 9appstore = "https://apps.apple.com/us/app/domaindig/id6760368004"
10privacy = "/privacy/domain-dig/" 10privacy = "/privacy/domain-dig/"
content/apps/hutch.md +1 −1
@@ -4,7 +4,7 @@ description = "A native iOS client for SourceHut."
4weight = 1 4weight = 1
5 5
6[extra] 6[extra]
7link = "https://github.com/krazywarez/hutch" 7link = "https://git.krz.sh/hutch"
8link_label = "Source" 8link_label = "Source"
9appstore = "https://apps.apple.com/us/app/hutch-for-sourcehut/id6760742299" 9appstore = "https://apps.apple.com/us/app/hutch-for-sourcehut/id6760742299"
10privacy = "/privacy/hutch/" 10privacy = "/privacy/hutch/"
content/apps/solar.md +1 −1
@@ -4,7 +4,7 @@ description = "A native iOS client for Cloudflare."
4weight = 3 4weight = 3
5 5
6[extra] 6[extra]
7link = "https://github.com/krazywarez/solar" 7link = "https://git.krz.sh/solar"
8link_label = "Source" 8link_label = "Source"
9privacy = "/privacy/solar/" 9privacy = "/privacy/solar/"
10+++ 10+++
sass/main.scss +2
@@ -137,6 +137,8 @@ a:hover { text-decoration: underline; text-underline-offset: 3px; }
137 137
138// ---- App page: actions + screenshots --------------------------------------- 138// ---- App page: actions + screenshots ---------------------------------------
139.app-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 2rem 0 1rem; } 139.app-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 2rem 0 1rem; }
140.prose a.btn { color: var(--text); }
141.prose a.btn-primary { color: var(--btn-fg); }
140.privacy-link { font-size: 0.9rem; margin: 0.25rem 0 0; } 142.privacy-link { font-size: 0.9rem; margin: 0.25rem 0 0; }
141 143
142.shots { 144.shots {