The Pages deployment is now the primary copy, so two things had to change: - Hosted pages fall back to steam-sync.py on 127.0.0.1:8765 instead of refusing to sync. steam-sync.py now answers Chrome's Private Network Access preflight (Access-Control-Allow-Private-Network), which is what a public https page needs before it may call into localhost. - The build sources lived in /tmp and would have been lost. They now live in build/, and build.py outputs to the repo root. deploy.sh rebuilds, commits and pushes in one step. Editing index.html directly is no longer the workflow - edit build/ and run ./deploy.sh.
31 lines
781 B
Bash
Executable file
31 lines
781 B
Bash
Executable file
#!/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)"
|