mirror of
https://github.com/pupperpowell/bibdle.git
synced 2026-04-05 17:33:31 -04:00
25 lines
435 B
Bash
Executable File
25 lines
435 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
echo "Pulling latest changes..."
|
|
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
|
|
|
|
echo "Building..."
|
|
bun --bun run build
|
|
|
|
SERVICE_NAME="$(basename "$(pwd)").service"
|
|
echo "Restarting service ($SERVICE_NAME)..."
|
|
sudo systemctl restart "$SERVICE_NAME"
|
|
|
|
echo "Done!"
|