animebot / setup-github.sh
luci18's picture
Upload folder using huggingface_hub
e4ccb70 verified
Raw History Blame Contribute Delete
1.38 kB
#!/bin/bash
# Setup script for GitHub and Hugging Face
echo "🎬 Anime Encoder Bot - GitHub + Hugging Face Setup"
echo "=================================================="
# Check if git is initialized
if [ ! -d .git ]; then
echo "πŸ“¦ Initializing git repository..."
git init
git branch -m main
else
echo "βœ… Git already initialized"
fi
# Add all files
echo "πŸ“ Adding files..."
git add .
# Initial commit
echo "πŸ’Ύ Creating initial commit..."
git commit -m "Initial commit: Anime Encoder Bot with all features" || echo "Nothing to commit"
# Ask for GitHub username
read -p "Enter your GitHub username: " GITHUB_USER
read -p "Enter your repository name (default: anime-encoder-bot): " REPO_NAME
REPO_NAME=${REPO_NAME:-anime-encoder-bot}
# Add remote
echo "πŸ”— Adding GitHub remote..."
git remote remove origin 2>/dev/null
git remote add origin "https://github.com/$GITHUB_USER/$REPO_NAME.git"
echo ""
echo "πŸ“€ To push to GitHub, run:"
echo " git push -u origin main"
echo ""
echo "πŸ€— For Hugging Face:"
echo " 1. Create a Space at: https://huggingface.co/new-space"
echo " 2. Select 'Docker' SDK"
echo " 3. Set space name: $REPO_NAME"
echo " 4. Copy space ID (username/space-name)"
echo " 5. Add HF_TOKEN and HF_SPACE_ID to GitHub Secrets"
echo ""
echo "πŸ”— GitHub Repository URL:"
echo " https://github.com/$GITHUB_USER/$REPO_NAME"