commit dd9977bf8e1e12e4e0a4a1ffc67f1a09d5eb5c26 Spenser Truex <truex@equwal.com> 2026-09-20 21:12:28 -0700 Add deploy-git.sh: regenerate and publish the git pages
deploy-git.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
diff --git a/deploy-git.sh b/deploy-git.sh new file mode 100644 index 0000000..15e0e3f --- /dev/null +++ b/deploy-git.sh @@ -0,0 +1,17 @@ +#!/bin/sh +# deploy-git.sh - regenerate the stagit-style pages and publish them. +# Run from the repo root, in Git Bash / any POSIX shell (needs git, gh, python3, ssh, tar). +# sh deploy-git.sh +set -e +HOST=root@honjimaku.com +WEBROOT=/var/www/recentlywritten + +python3 stagit-gen.py equwal git "${TMPDIR:-${TEMP:-/tmp}}/stagit-cache" + +# Replace only git/ and git.html; nothing else in the webroot is touched. +ssh "$HOST" "rm -rf $WEBROOT/git" +tar cf - git git.html | ssh "$HOST" "cd $WEBROOT && tar xf - --no-same-owner \ + && chown -R 197108:197121 git git.html \ + && find git -type d -exec chmod 775 {} + && find git -type f -exec chmod 664 {} + \ + && chmod 664 git.html" +echo "published: https://recentlywritten.com/git/"