#!/bin/bash # Hugging Face Space deployment script for Jupyter Notebook set -e echo "🚀 Starting Hugging Face Space deployment..." # Check if we're in the right directory if [ ! -f "system_workflow_analysis.ipynb" ]; then echo "❌ Error: system_workflow_analysis.ipynb not found in current directory" exit 1 fi # Configure git for Hugging Face git config user.name "kenken999" git config user.email "miyataken999@bpmboxes.com" # Check git status echo "📊 Current git status:" git status # Add files if not already staged if git diff --cached --quiet; then echo "📋 Staging files..." git add system_workflow_analysis.ipynb else echo "✅ Files already staged" fi # Create commit if there are changes if ! git diff --cached --quiet; then echo "💾 Creating commit..." git commit -m "Add comprehensive system workflow analysis Jupyter notebook Features: - Complex system workflow visualization with Mermaid diagrams - Database relationship diagrams (ERD) - GitHub API integration flow - Google Chat notification workflow - Complete approval system workflow - Real-time system monitoring capabilities - Interactive controls for system management This notebook provides comprehensive visualization and analysis of the automated system generation and approval workflow." else echo "✅ No changes to commit" fi # Try to push with credential helper echo "🔄 Attempting to push to Hugging Face Space..." # Method 1: Try direct push if git push origin main 2>/dev/null; then echo "✅ Successfully pushed to Hugging Face Space!" echo "🌐 Notebook available at: https://huggingface.co/spaces/kenken999/fastapi_django_main_live/blob/main/system_workflow_analysis.ipynb" exit 0 fi echo "❗ Direct push failed. The notebook has been committed locally." echo "📝 Manual steps needed:" echo "1. Go to https://huggingface.co/spaces/kenken999/fastapi_django_main_live" echo "2. Upload the system_workflow_analysis.ipynb file manually" echo "3. Or configure your Hugging Face token for git authentication" echo "💡 To set up git authentication with Hugging Face:" echo " git remote set-url origin https://USER:TOKEN@huggingface.co/spaces/kenken999/fastapi_django_main_live" echo " (Replace USER with your username and TOKEN with your HF token)"