diff options
Diffstat (limited to 'mise.toml')
| -rw-r--r-- | mise.toml | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -1,3 +1,6 @@ +[tools] +caddy = "latest" + [tasks.gen] run = "weft -gitignore . https://tjp.lol" @@ -35,3 +38,17 @@ run = "jj git push -b main" [tasks.deploy] description = "Push the 'main' bookmark and update weft on the server" depends = ["deploy:weft", "deploy:site"] + +[tasks."upload:image"] +description = "Upload an image to the production server" +usage = 'arg "file" "path"' +run = ''' +set -euo pipefail + +fname=`basename $usage_file` +dirpath=`dirname $usage_path` +site_imgs=/jail/volumes/web/https/images + +scp $usage_file t@tjp.lol:/tmp/$fname +ssh t@tjp.lol "doas sh -c 'mkdir -p ${site_imgs}/${dirpath} && mv /tmp/${fname} ${site_imgs}/${usage_path} && chown root:wheel ${site_imgs}/${usage_path}'" +''' |
