Refactor script building / add to gitignore / 2 new scripts

This commit is contained in:
Leons Aleksandrovs
2025-11-14 22:57:27 +02:00
parent 95e6708713
commit a7f089e159
6 changed files with 57 additions and 35 deletions

View File

@@ -0,0 +1,28 @@
# Local paths
LOCAL_PUBLIC="./public"
LOCAL_MANIFEST="./mix-manifest.json"
# Clear screen
clear
# Build assets
echo "Building assets..."
bun run dev
echo "Starting deployment..."
# Sync public folder (js, css, images, etc.)
echo "Syncing public folder..."
sshpass -p "$SERVER_PASSWORD" rsync -avz --progress \
--exclude 'storage' \
--exclude '.htaccess' \
"$LOCAL_PUBLIC/" "$SERVER_USER@$SERVER_HOST:$SERVER_PATHpublic/"
# Upload mix-manifest.json specifically (if not already synced)
echo "Uploading mix-manifest.json..."
sshpass -p "$SERVER_PASSWORD" scp "$LOCAL_MANIFEST" \
"$SERVER_USER@$SERVER_HOST:$SERVER_PATH/mix-manifest.json"
echo "Deployment complete!"