| import { execSync } from 'child_process'; | |
| import * as dotenv from 'dotenv'; | |
| dotenv.config(); | |
| async function deploy() { | |
| console.log('๐ Starting deployment to Hugging Face...'); | |
| try { | |
| // Configure git | |
| execSync('git config --global user.email "deploy@wbes.com"'); | |
| execSync('git config --global user.name "WBES Deploy"'); | |
| // Add Hugging Face remote if it doesn't exist | |
| try { | |
| execSync('git remote get-url hf'); | |
| } catch { | |
| execSync('git remote add hf https://huggingface.co/spaces/wbes/executive-suites'); | |
| } | |
| // Push to Hugging Face | |
| execSync('git push hf main', { stdio: 'inherit' }); | |
| console.log('โ Deployment successful!'); | |
| } catch (error) { | |
| console.error('โ Deployment failed:', error); | |
| process.exit(1); | |
| } | |
| } | |
| deploy(); |