diff --git a/.agent/workflows/deploy_to_production.md b/.agent/workflows/deploy_to_production.md index d1a60a7..b3ca112 100644 --- a/.agent/workflows/deploy_to_production.md +++ b/.agent/workflows/deploy_to_production.md @@ -77,6 +77,9 @@ ```bash # This script handles authentication, syncing, and remote rebuilding. bash /app/scripts/remote_deploy.sh + +# If you want to deploy quickly without rebuilding the standalone agent binaries: +bash /app/scripts/remote_deploy.sh --skip-binaries ``` --- diff --git a/scripts/local_rebuild.sh b/scripts/local_rebuild.sh index 0b3b5ec..671e9cd 100755 --- a/scripts/local_rebuild.sh +++ b/scripts/local_rebuild.sh @@ -23,6 +23,13 @@ echo "🚀 Starting AI Hub deployment process..." +BUILD_BINARIES=true +for arg in "$@"; do + if [ "$arg" == "--skip-binaries" ]; then + BUILD_BINARIES=false + fi +done + # 1. Base compose file COMPOSE_FILES="-f docker-compose.yml" @@ -56,10 +63,14 @@ sudo docker image prune -f || true echo "🏗️ Building standalone Agent Node binaries..." -if [ -f "agent-node/scripts/build_binaries.sh" ]; then - bash agent-node/scripts/build_binaries.sh +if [ "$BUILD_BINARIES" = true ]; then + if [ -f "agent-node/scripts/build_binaries.sh" ]; then + bash agent-node/scripts/build_binaries.sh + else + echo "⚠️ agent-node/scripts/build_binaries.sh not found, skipping binary build." + fi else - echo "⚠️ agent-node/scripts/build_binaries.sh not found, skipping binary build." + echo "⏭️ Skipping binary build." fi echo "✨ Cleanup finished." diff --git a/scripts/remote_deploy.sh b/scripts/remote_deploy.sh index a29fe6f..8d0cb95 100755 --- a/scripts/remote_deploy.sh +++ b/scripts/remote_deploy.sh @@ -90,7 +90,7 @@ echo "Deploying on production server..." sshpass -p "$PASS" ssh -o StrictHostKeyChecking=no "$USER@$HOST" << EOF cd $REMOTE_PROJ - echo '$PASS' | sudo -S bash scripts/local_rebuild.sh + echo '$PASS' | sudo -S bash scripts/local_rebuild.sh $@ EOF echo "Done! The new code is deployed to $HOST."