ad-reflections / deploy.sh
Tristan Yu
Rename site to 'Ad Reflections' - update branding in hf-space
3f4cb51
#!/bin/bash
# Ad Reflections - Hugging Face Deployment Script
echo "πŸš€ Ad Reflections Deployment Script"
echo "=========================================="
# Check if username is provided
if [ -z "$1" ]; then
echo "❌ Error: Please provide your Hugging Face username"
echo "Usage: ./deploy.sh YOUR_USERNAME"
exit 1
fi
USERNAME=$1
SPACE_NAME="transcreation-explorer"
SPACE_URL="https://huggingface.co/spaces/$USERNAME/$SPACE_NAME"
echo "πŸ‘€ Username: $USERNAME"
echo "πŸ“¦ Space: $SPACE_NAME"
echo "🌐 URL: $SPACE_URL"
echo ""
# Update README.md with correct username
echo "πŸ“ Updating README.md with your username..."
sed -i.bak "s/YOUR_USERNAME/$USERNAME/g" README.md
rm README.md.bak 2>/dev/null || true
echo "βœ… README.md updated"
# Check if we're in a git repository
if [ ! -d ".git" ]; then
echo "πŸ“‚ Initializing git repository..."
git init
git remote add origin https://huggingface.co/spaces/$USERNAME/$SPACE_NAME
else
echo "πŸ“‚ Git repository detected"
fi
# Add all files
echo "πŸ“ Adding files to git..."
git add .
# Commit changes
echo "πŸ’Ύ Committing changes..."
git commit -m "Deploy Ad Reflections to Hugging Face Spaces"
# Push to Hugging Face
echo "πŸš€ Pushing to Hugging Face Spaces..."
git push origin main
echo ""
echo "βœ… Deployment initiated!"
echo "πŸ”— Your space will be available at: $SPACE_URL"
echo "⏳ Build typically takes 5-10 minutes"
echo "πŸ“Š Monitor build progress in the 'Logs' tab"
echo ""
echo "πŸŽ‰ Happy transcreating!"