chore: add deploy.sh script for server deployment
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
dc56132452
commit
89ab022c01
1 changed files with 20 additions and 0 deletions
20
deploy.sh
Normal file
20
deploy.sh
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
APP_DIR="/opt/build-a-squad"
|
||||
WEB_DIR="/var/www/html/build-a-squad"
|
||||
|
||||
echo "==> Pulling latest code..."
|
||||
cd "$APP_DIR"
|
||||
git pull origin main
|
||||
|
||||
echo "==> Installing dependencies..."
|
||||
npm install
|
||||
|
||||
echo "==> Building..."
|
||||
npm run build
|
||||
|
||||
echo "==> Deploying to $WEB_DIR..."
|
||||
sudo cp -r "$APP_DIR/dist/." "$WEB_DIR/"
|
||||
|
||||
echo "==> Done. $(date)"
|
||||
Loading…
Add table
Reference in a new issue