File size: 1,319 Bytes
d42ed51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8ca285d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash

# Deploy script - pushes to both GitHub and Hugging Face
# Usage: ./scripts/deploy.sh [commit_message]

set -e  # Exit on any error

echo "πŸš€ Deploying to GitHub and Hugging Face..."

# Get commit message from argument or use default
if [ -n "$1" ]; then
    commit_msg="$1"
else
    commit_msg="feat: Deploy latest changes"
fi

# Check if there are changes to commit
if git diff --quiet && git diff --cached --quiet; then
    echo "ℹ️  No changes to commit"
else
    echo "πŸ“ Committing changes: $commit_msg"
    git add -A
    git commit -m "$commit_msg"
fi

# Push to GitHub
echo "πŸ“€ Pushing to GitHub..."
if git push origin main; then
    echo "βœ… Successfully pushed to GitHub"
else
    echo "❌ Failed to push to GitHub"
    exit 1
fi

# Push to Hugging Face
echo "πŸ“€ Pushing to Hugging Face..."
if git push hf main; then
    echo "βœ… Successfully deployed to Hugging Face!"
    echo "πŸ”— Check deployment at: https://huggingface.co/spaces/colin730/SummarizerApp"
    echo "⏱️  Build time: ~5-10 minutes"
    echo ""
    echo "🎯 Monitor deployment with:"
    echo "   curl -s https://colin730-summarizerapp.hf.space/health"
else
    echo "❌ Failed to push to Hugging Face"
    exit 1
fi

echo ""
echo "πŸŽ‰ Deployment complete! Both GitHub and Hugging Face are updated."