Skip to content

fix(frontend, backend): add missing WebSocketService import in chat.t… #255

fix(frontend, backend): add missing WebSocketService import in chat.t…

fix(frontend, backend): add missing WebSocketService import in chat.t… #255

Workflow file for this run

name: Production Deploy
on:
push:
branches: ["main"]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: SSH Remote Commands
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: 22
script: |
# --- 0. PREPARE ENVIRONMENT ---
cd /root/NextVibe
git config --global --add safe.directory /root/NextVibe
# --- 1. STOP CRITICAL SERVICES ---
sudo systemctl stop nextvibe-moderation.service
# --- 2. HARD RESET (Nuclear Option) ---
echo "🔥 Forcing Git state..."
git fetch --all
git checkout main
git reset --hard origin/main
git clean -fd
git pull origin main
# --- 3. PYTHON UPDATE ---
echo "🐍 Updating Python..."
./backend/.venv/bin/pip install -r backend/modules.txt
./backend/.venv/bin/python backend/NextVibeAPI/manage.py migrate
./backend/.venv/bin/python backend/NextVibeAPI/manage.py collectstatic --noinput
# --- 4. GO REBUILD ---
echo "🐹 Rebuilding Go..."
cd moderation_service
rm -f moderator_bin
go build -o moderator_bin .
cd ..
# --- 5. NFT SERVICE UPDATE ---
echo "🦊 Updating NFT service..."
cd nft-service
bun install
cd ..
# --- 6. TX INDEXER UPDATE ---
echo "📦 Updating TX Indexer..."
cd tx-indexer
bun install
cd ..
# --- 7. RESTART ALL ---
echo "🔄 Restarting Services..."
sudo systemctl restart nextvibe-backend.service
sudo systemctl restart nextvibe-realtime.service
sudo systemctl restart nextvibe-celery-beat.service
sudo systemctl restart nextvibe-celery-worker.service
sudo systemctl start nextvibe-moderation.service
sudo systemctl restart nextvibe-nft.service
sudo systemctl restart nextvibe-indexer.service
sudo systemctl reload nginx
echo "✅ DEPLOYMENT FINISHED SUCCESSFULLY"