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. |
| |
3 | set -euo pipefail |
| |
4 | |
| |
5 | remote_host="homelab" |
| |
6 | remote_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). |
| |
10 | zero="0000000000000000000000000000000000000000" |
| |
11 | deploy=0 |
| |
12 | while 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 |
| |
16 | done |
| |
17 | |
| |
18 | if [ "$deploy" -eq 0 ]; then |
| |
19 | exit 0 |
| |
20 | fi |
| |
21 | |
| |
22 | echo "pre-push: building site with zola..." |
| |
23 | zola build |
| |
24 | |
| |
25 | echo "pre-push: deploying to ${remote_host}:${remote_path}..." |
| |
26 | rsync -az --delete public/ "${remote_host}:${remote_path}/" |
| |
27 | |
| |
28 | echo "pre-push: deploy complete." |
.github/workflows/deploy.yml
deleted
−39
| @@ -1,39 +0,0 @@ |
| 1 | name: Deploy to GitHub Pages |
| |
| 2 | |
| |
| 3 | on: |
| |
| 4 | push: |
| |
| 5 | branches: [main] |
| |
| 6 | workflow_dispatch: |
| |
| 7 | |
| |
| 8 | permissions: |
| |
| 9 | contents: read |
| |
| 10 | pages: write |
| |
| 11 | id-token: write |
| |
| 12 | |
| |
| 13 | concurrency: |
| |
| 14 | group: pages |
| |
| 15 | cancel-in-progress: true |
| |
| 16 | |
| |
| 17 | jobs: |
| |
| 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 | |
| 9 | Native apps and privacy-respecting frontends. Each one is small, focused, and |
9 | Native apps and privacy-respecting frontends. Each one is small, focused, and |
| 10 | built to last. Source is on [GitHub](https://github.com/krazywarez). |
10 | built 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." |
| 4 | weight = 5 |
4 | weight = 5 |
| 5 | |
5 | |
| 6 | [extra] |
6 | [extra] |
| 7 | link = "https://github.com/krazywarez/daybyday" |
7 | link = "https://git.krz.sh/daybyday" |
| 8 | link_label = "Source" |
8 | link_label = "Source" |
| 9 | appstore = "https://apps.apple.com/us/app/daybyday-learn/id6760321939" |
9 | appstore = "https://apps.apple.com/us/app/daybyday-learn/id6760321939" |
| 10 | privacy = "/privacy/daybyday/" |
10 | privacy = "/privacy/daybyday/" |
content/apps/domain-dig.md
+1 −1
| @@ -4,7 +4,7 @@ description = "DNS and SSL analysis, in your pocket." |
| 4 | weight = 2 |
4 | weight = 2 |
| 5 | |
5 | |
| 6 | [extra] |
6 | [extra] |
| 7 | link = "https://github.com/krazywarez/domain-dig" |
7 | link = "https://git.krz.sh/domain-dig" |
| 8 | link_label = "Source" |
8 | link_label = "Source" |
| 9 | appstore = "https://apps.apple.com/us/app/domaindig/id6760368004" |
9 | appstore = "https://apps.apple.com/us/app/domaindig/id6760368004" |
| 10 | privacy = "/privacy/domain-dig/" |
10 | privacy = "/privacy/domain-dig/" |
content/apps/hutch.md
+1 −1
| @@ -4,7 +4,7 @@ description = "A native iOS client for SourceHut." |
| 4 | weight = 1 |
4 | weight = 1 |
| 5 | |
5 | |
| 6 | [extra] |
6 | [extra] |
| 7 | link = "https://github.com/krazywarez/hutch" |
7 | link = "https://git.krz.sh/hutch" |
| 8 | link_label = "Source" |
8 | link_label = "Source" |
| 9 | appstore = "https://apps.apple.com/us/app/hutch-for-sourcehut/id6760742299" |
9 | appstore = "https://apps.apple.com/us/app/hutch-for-sourcehut/id6760742299" |
| 10 | privacy = "/privacy/hutch/" |
10 | privacy = "/privacy/hutch/" |
content/apps/solar.md
+1 −1
| @@ -4,7 +4,7 @@ description = "A native iOS client for Cloudflare." |
| 4 | weight = 3 |
4 | weight = 3 |
| 5 | |
5 | |
| 6 | [extra] |
6 | [extra] |
| 7 | link = "https://github.com/krazywarez/solar" |
7 | link = "https://git.krz.sh/solar" |
| 8 | link_label = "Source" |
8 | link_label = "Source" |
| 9 | privacy = "/privacy/solar/" |
9 | privacy = "/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 { |