TutorialDecember 15, 20245 min read
Setting Up GitHub Auto-Deploy for Your Discord Bot
Learn how to set up automatic deployments from GitHub to NexusHost. Push code, bot updates automatically.
Alex Rivera
DevOps Engineer

Setting Up GitHub Auto-Deploy for Your Discord Bot
One of NexusHost's best features is automatic deployment from GitHub. Here's how to set it up.
Why Auto-Deploy?
Manual deployments are error-prone and time-consuming:
- Upload files manually
- Remember to restart the bot
- Risk of deploying wrong version
With auto-deploy:
- Push to GitHub
- Bot updates automatically
- Zero downtime deployments
Setup Steps
1. Connect GitHub
In your NexusHost dashboard:
- Go to Settings > GitHub
- Click "Connect GitHub"
- Authorize NexusHost
2. Select Repository
Choose your bot's repository from the list.
3. Configure Branch
Select which branch triggers deployments (usually main or production).
4. Set Start Command
NexusHost auto-detects most setups, but you can customize:
- Node.js:
node index.js - Python:
python main.py
Environment Variables
Never commit tokens to GitHub! Use NexusHost's environment variables:
- Go to Settings > Environment
- Add
DISCORD_TOKEN - Add any other secrets
Deployment Flow
git add .
git commit -m "Add new command"
git push origin main
# NexusHost automatically:
# 1. Pulls the new code
# 2. Installs dependencies
# 3. Restarts your botRollback
Made a mistake? Roll back instantly:
- Go to Deployments
- Find the previous version
- Click "Redeploy"
Conclusion
Auto-deploy transforms your development workflow. Code locally, push to GitHub, and your bot updates automatically.

