fix: deploy.sh pull_code now works with monorepo structure
Some checks are pending
CI / Backend Lint & Test (push) Waiting to run
CI / Frontend Lint & Test (push) Waiting to run
CI / Integration Tests (push) Blocked by required conditions
CI / Build Backend Docker Image (push) Blocked by required conditions
CI / Build Frontend (push) Blocked by required conditions
CI / Security Scan (push) Waiting to run
CI / Dependency Check (push) Waiting to run

Was checking backend/.git and frontend/.git (submodule pattern) which
never exists — git pull silently skipped, deploying stale code.
Now pulls root repo first, falls back to submodule pattern.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Vadym Samoilenko 2026-04-16 11:50:20 +01:00
parent cf761c4bb6
commit b5e5ad7e42

View file

@ -105,26 +105,25 @@ preflight_checks() {
pull_code() {
print_header "Pulling Latest Code"
# Pull backend
if [ -d "backend/.git" ]; then
if [ -d ".git" ]; then
print_info "Pulling monorepo..."
git pull origin main
print_success "Code updated"
elif [ -d "backend/.git" ]; then
print_info "Pulling backend repository..."
cd backend
git pull
cd ..
cd backend && git pull && cd ..
print_success "Backend code updated"
else
print_warning "Backend is not a git repository, skipping pull"
fi
# Pull frontend
if [ -d "frontend/.git" ]; then
print_info "Pulling frontend repository..."
cd frontend
git pull
cd ..
print_success "Frontend code updated"
if [ -d "frontend/.git" ]; then
print_info "Pulling frontend repository..."
cd frontend && git pull && cd ..
print_success "Frontend code updated"
else
print_warning "Frontend is not a git repository, skipping pull"
fi
else
print_warning "Frontend is not a git repository, skipping pull"
print_error "No git repository found. Cannot pull latest code."
exit 1
fi
echo ""