fix: configure deploy.sh to push with Gitea token authentication

This commit is contained in:
2026-05-23 13:04:25 +00:00
parent b7866000b4
commit e9207b4315
+6 -1
View File
@@ -12,6 +12,10 @@ HOME_DST="/home/jgitta/kiosk-home/index.html"
CONFIG_SRC="$REPO_DIR/config.json" CONFIG_SRC="$REPO_DIR/config.json"
COMMIT_MSG="${1:-deploy: update from kiosk-dev $(date +%Y-%m-%d)}" COMMIT_MSG="${1:-deploy: update from kiosk-dev $(date +%Y-%m-%d)}"
# Gitea credentials (from credentials.md)
GITEA_TOKEN="4fe93c6c62490ef0bb4e4aeec58f47da26752ce8"
GITEA_USER="jgitta"
inject_config() { inject_config() {
local src="$1" local src="$1"
local dst="$2" local dst="$2"
@@ -39,7 +43,8 @@ fi
echo "==> Committing and pushing to Gitea..." echo "==> Committing and pushing to Gitea..."
git -C "$REPO_DIR" add -A git -C "$REPO_DIR" add -A
git -C "$REPO_DIR" commit -m "$COMMIT_MSG" 2>/dev/null || echo " (nothing new to commit)" git -C "$REPO_DIR" commit -m "$COMMIT_MSG" 2>/dev/null || echo " (nothing new to commit)"
git -C "$REPO_DIR" push origin master || echo " (nothing new to push)" git -C "$REPO_DIR" remote set-url origin "https://$GITEA_USER:$GITEA_TOKEN@gitea.jgitta.com/jgitta/senior-kiosk.git"
git -C "$REPO_DIR" push origin master || echo " (push failed — check network)"
echo "==> Restarting kiosk-dev..." echo "==> Restarting kiosk-dev..."
/usr/local/bin/kiosk-restart /usr/local/bin/kiosk-restart