-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy_to_github.sh
More file actions
executable file
·140 lines (117 loc) · 3.45 KB
/
Copy pathdeploy_to_github.sh
File metadata and controls
executable file
·140 lines (117 loc) · 3.45 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
#!/bin/bash
# deploy_to_github.sh - Improved script to deploy to GitHub
echo "====================================================="
echo " Deploying AI Avatar Video to GitHub"
echo "====================================================="
# Configure Git identity
read -p "Enter your Git email: " email
read -p "Enter your Git name: " name
git config --global user.email "$email"
git config --global user.name "$name"
# Clean up any existing Git configurations
rm -rf .git
# Initialize fresh Git repository
echo "Initializing fresh Git repository..."
git init
# Configure main branch instead of master
git branch -M main
# Remove embedded Git repositories (if any)
echo "Cleaning up embedded repositories..."
rm -rf integrations/ComfyUI/.git integrations/Talking_Face_Avatar/.git integrations/facechain/.git integrations/fast-stable-diffusion/.git integrations/image-generator/.git 2>/dev/null || true
# Create and update .gitignore
echo "Creating .gitignore file..."
cat > .gitignore << EOF
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
# Virtual Environment
venv/
ENV/
env/
# IDE files
.idea/
.vscode/
*.swp
*.swo
# Database
*.db
*.sqlite3
# Application specific
app/storage/characters/*
app/storage/renders/*
app/storage/thumbs/*
!app/storage/characters/.gitkeep
!app/storage/renders/.gitkeep
!app/storage/thumbs/.gitkeep
# Log files
*.log
# OS specific
.DS_Store
Thumbs.db
# Environment variables
.env
# Embedded git repositories
integrations/*/
EOF
# Create storage directory placeholders
mkdir -p app/storage/characters app/storage/renders app/storage/thumbs
touch app/storage/characters/.gitkeep app/storage/renders/.gitkeep app/storage/thumbs/.gitkeep
# Ask for GitHub username and repository name
read -p "Enter your GitHub username: " username
read -p "Enter the name for your new repository (e.g., ai-avatar-video): " reponame
# Add all files
echo "Adding files to Git..."
git add .
# Commit changes
echo "Committing changes..."
git commit -m "Initial commit of AI Avatar Video application"
# Instructions for creating repository on GitHub
echo ""
echo "Please create a new repository on GitHub:"
echo "1. Go to https://github.com/new"
echo "2. Enter repository name: $reponame"
echo "3. Make it public or private as you prefer"
echo "4. Click 'Create repository'"
echo "5. Do NOT initialize with README, .gitignore, or license"
echo ""
read -p "Press Enter once you've created the repository on GitHub... "
# Add remote and push
echo "Adding remote..."
git remote add origin "https://github.com/$username/$reponame.git"
echo "Pushing to GitHub..."
git push -u origin main
echo ""
echo "====================================================="
echo "Repository deployed to GitHub!"
echo "Your code is now on GitHub at: https://github.com/$username/$reponame"
echo ""
echo "To set up deployment to Render.com:"
echo "1. Go to render.com and sign up/login"
echo "2. Click 'New +' and select 'Web Service'"
echo "3. Connect your GitHub account and select this repository"
echo "4. Configure as follows:"
echo " - Name: ai-avatar-video (or your preferred name)"
echo " - Environment: Python"
echo " - Build Command: pip install -r requirements.txt"
echo " - Start Command: gunicorn app.main:app -k uvicorn.workers.UvicornWorker -b 0.0.0.0:\$PORT"
echo " - Plan: Free"
echo "5. Click 'Create Web Service'"
echo "====================================================="