summaryrefslogtreecommitdiff
path: root/publish.sh
diff options
context:
space:
mode:
authorlsof <lsof@mailbox.org>2026-01-22 18:53:49 +0100
committerlsof <lsof@mailbox.org>2026-01-22 18:53:49 +0100
commit0ad8406d527adb26934da649bf77abf2c3d66776 (patch)
tree707724f20e52dc601326936a7a734ab42fecf4dd /publish.sh
parentbadced1b07a986a4e4385b7a2dba319a61fadf12 (diff)
k
Diffstat (limited to 'publish.sh')
-rwxr-xr-xpublish.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/publish.sh b/publish.sh
new file mode 100755
index 0000000..aed9d88
--- /dev/null
+++ b/publish.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+set -eox pipefail
+
+base="$(realpath $(dirname "$0"))"
+git checkout main
+hash="$(git rev-parse HEAD| head -c 12)"
+temp="/tmp/site-$hash"
+
+git push
+zola build
+cd /tmp
+git clone --branch pages "$base" "$temp"
+cd "$temp"
+git rm -r "*" || :
+cp -ar "$base"/public/* "$base"/.domains .
+git add --all
+git commit -m "Publish $hash" || :
+git remote add cb 'ssh://git@codeberg.org/lsof/pages.git'
+git push cb
+cd
+rm -rf "$temp"