#!/usr/bin/env bash # # Rebuild the companion and publish it to the Pages branch. # # ./deploy.sh commit as "Update companion" # ./deploy.sh "fix dog tags" custom commit message # # The Pages site rebuilds itself from the pushed branch, usually within ~15s: # https://rain.pages.melonbread.xyz/la-li-lu-le-lo/ # set -euo pipefail cd "$(dirname "$0")" echo "==> building" python3 build/build.py if git diff --quiet && git diff --cached --quiet; then echo "==> nothing changed, nothing to publish" exit 0 fi echo "==> committing" git add -A git commit -m "${1:-Update companion}" echo "==> pushing" git push origin pages echo echo "done. live at https://rain.pages.melonbread.xyz/la-li-lu-le-lo/" echo "(Pages usually picks it up within ~15 seconds)"