Compare commits

...

3 Commits

Author SHA1 Message Date
George Powell
f9f3f3de12 Update deploy.sh 2026-02-24 19:10:53 -05:00
George Powell
abab886d1a abort if already up to date 2026-02-24 18:11:42 -05:00
George Powell
acc82af7cd updated deploy script 2026-02-24 18:04:28 -05:00
3 changed files with 15 additions and 27 deletions

2
.gitignore vendored
View File

@@ -30,3 +30,5 @@ llms-*
embeddings*
*bible.xml
engwebu_usfx.xml
deploy.log

View File

@@ -1,22 +0,0 @@
#!/bin/bash
set -e
cd "$(dirname "$0")"
echo "Pulling latest changes..."
git pull
echo "Installing dependencies..."
bun i
echo "Pushing database changes..."
bun run db:generate
bun run db:migrate
echo "Building..."
bun --bun run build
echo "Restarting service..."
sudo systemctl restart bibdle-test
echo "Done!"

View File

@@ -3,16 +3,24 @@ set -e
cd "$(dirname "$0")"
BUN=$(which bun)
echo "Pulling latest changes..."
git pull
PULL_OUTPUT=$(git pull)
echo "$PULL_OUTPUT"
if [ "$PULL_OUTPUT" = "Already up to date." ]; then
echo "Nothing to deploy."
exit 0
fi
echo "Installing dependencies..."
bun i
$BUN i
echo "Building..."
bun --bun run build
$BUN --bun run build
echo "Restarting service..."
sudo systemctl restart bibdle
SERVICE_NAME="$(basename "$(pwd)").service"
echo "Restarting service ($SERVICE_NAME)..."
sudo systemctl restart "$SERVICE_NAME"
echo "Done!"