From 6098b61ac6f6307457527038e77a0d07f1f5354e Mon Sep 17 00:00:00 2001 From: brutsalvadi Date: Thu, 7 May 2026 22:46:59 +0200 Subject: [PATCH] Replace rsync with git pull in sync-vps.sh --- scripts/sync-vps.sh | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/scripts/sync-vps.sh b/scripts/sync-vps.sh index 2bf9ebf..85b5b16 100755 --- a/scripts/sync-vps.sh +++ b/scripts/sync-vps.sh @@ -1,24 +1,11 @@ #!/usr/bin/env bash -# Pull markdown content from VPS, commit any changes, then push everything back. +# Pull web-edit commits from VPS, then push everything back. # Usage: bash scripts/sync-vps.sh set -e cd "$(dirname "$0")/.." -VPS=root@95.216.55.151 -REMOTE=/opt/bincio_wiki - -echo "==> Syncing pages/ and blog/ from VPS..." -rsync -az --delete --exclude='.git' "$VPS:$REMOTE/pages/" pages/ -rsync -az --delete --exclude='.git' "$VPS:$REMOTE/blog/" blog/ - -echo "==> Checking for content changes..." -if [ -n "$(git status --porcelain pages/ blog/)" ]; then - git add pages/ blog/ - git commit -m "updated pages/blog from vps" - echo " Committed content changes." -else - echo " No changes." -fi +echo "==> Pulling web-edit commits from VPS..." +git pull --rebase vps main echo "==> Pushing site submodule to VPS..." (cd site && git push vps main)