enter pword once
This commit is contained in:
parent
d89a58c0ab
commit
081c728d12
|
|
@ -10,14 +10,13 @@ source "$ROOT_DIR/scripts/config.sh"
|
||||||
|
|
||||||
git push origin main
|
git push origin main
|
||||||
|
|
||||||
# SSH to target and update
|
# SSH to target: pull, build, sync apps, restart
|
||||||
ssh "$HOST" "cd $DEST && git pull origin main && bun run build"
|
ssh "$HOST" DEST="$DEST" APPS_DIR="$APPS_DIR" bash <<'SCRIPT'
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cd "$DEST" && git pull origin main && bun run build
|
||||||
|
|
||||||
# Sync default apps/tools from repo to APPS_DIR
|
|
||||||
echo "=> Syncing default apps..."
|
echo "=> Syncing default apps..."
|
||||||
ssh "$HOST" bash -s "$DEST" "$APPS_DIR" <<'SCRIPT'
|
|
||||||
DEST="$1"
|
|
||||||
APPS_DIR="$2"
|
|
||||||
for app_dir in "$DEST"/apps/*/; do
|
for app_dir in "$DEST"/apps/*/; do
|
||||||
app=$(basename "$app_dir")
|
app=$(basename "$app_dir")
|
||||||
for version_dir in "$app_dir"*/; do
|
for version_dir in "$app_dir"*/; do
|
||||||
|
|
@ -32,9 +31,9 @@ for app_dir in "$DEST"/apps/*/; do
|
||||||
(cd "$target" && bun install --frozen-lockfile 2>/dev/null || bun install)
|
(cd "$target" && bun install --frozen-lockfile 2>/dev/null || bun install)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
SCRIPT
|
|
||||||
|
|
||||||
ssh "$HOST" "sudo systemctl restart toes.service"
|
sudo systemctl restart toes.service
|
||||||
|
SCRIPT
|
||||||
|
|
||||||
echo "=> Deployed to $HOST"
|
echo "=> Deployed to $HOST"
|
||||||
echo "=> Visit $URL"
|
echo "=> Visit $URL"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user