summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authort <t@tjp.lol>2026-07-13 08:14:21 -0600
committert <t@tjp.lol>2026-07-13 08:20:49 -0600
commitb3d5e1ac33ff929727cffc2b3025def9884566fe (patch)
tree0937ca05fdc969c469a6abebdcdec733ea4a1c0a
parent214a69127b1b28e12eaa776c7996f6d377df0585 (diff)
deployment mise tasks
-rw-r--r--mise.toml21
1 files changed, 21 insertions, 0 deletions
diff --git a/mise.toml b/mise.toml
index 270c624..40433a8 100644
--- a/mise.toml
+++ b/mise.toml
@@ -13,4 +13,25 @@ rm -f .weft-txn-*
'''
[tasks.dev]
+description = "Run the auto-reloading dev server and open the site in a browser"
run = "(sleep 1 && open http://127.0.0.1:8001/) & exec air"
+
+[tasks."deploy:weft"]
+description = "Build and deploy weft to tjp.lol"
+run = '''
+set -euo pipefail
+
+cd ../weft
+env GOOS=freebsd GOARCH=amd64 go build -o weft-freebsd-amd64 .
+trap 'rm weft-freebsd-amd64' EXIT
+scp weft-freebsd-amd64 t@tjp.lol:weft
+ssh t@tjp.lol "doas sh -c 'mv weft /jail/containers/code-push/usr/local/bin/weft && chown root:wheel /jail/containers/code-push/usr/local/bin/weft'"
+'''
+
+[tasks."deploy:site"]
+description = "Push the current 'main' bookmark to deploy the site"
+run = "jj git push -b main"
+
+[tasks.deploy]
+description = "Push the 'main' bookmark and update weft on the server"
+depends = ["deploy:weft", "deploy:site"]