diff options
| -rw-r--r-- | mise.toml | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -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"] |
