#!/bin/bash

# cPanel Deployment Script for Randevu Frontend
# This script builds the frontend and prepares files for cPanel upload

echo "Building frontend for cPanel deployment..."

# Navigate to frontend directory
cd frontend

# Install dependencies
echo "Installing dependencies..."
yarn install

# Build the project
echo "Building project..."
yarn build

# Copy .htaccess to build directory
echo "Copying .htaccess to build directory..."
cp .htaccess build/

echo "Build complete!"
echo "Upload the contents of 'frontend/build' folder to your cPanel public_html directory"
echo "Make sure to update REACT_APP_API_URL in your environment or build configuration"
