Make sure you have added these secrets in your GitHub repository: https://github.com/CristianProdius/telegram-gym-bot/settings/secrets/actions
-
VPS_HOST- Your VPS IP address (e.g.,123.45.67.89) -
VPS_USER- Should bedeploy -
VPS_SSH_KEY- Your SSH private key (see below how to generate)
-
TELEGRAM_BOT_TOKEN- Your bot token -
TELEGRAM_CHAT_ID- Your Telegram user ID
Run these commands on your VPS as the deploy user:
# SSH into your VPS
ssh root@your-vps-ip
# Switch to deploy user
su - deploy
# Generate SSH key
ssh-keygen -t ed25519 -C "github-actions" -f ~/.ssh/github_actions -N ""
# Add to authorized keys
cat ~/.ssh/github_actions.pub >> ~/.ssh/authorized_keys
# Display the private key (copy ALL of this including BEGIN and END lines)
cat ~/.ssh/github_actionsCopy the ENTIRE output (including -----BEGIN OPENSSH PRIVATE KEY----- and -----END OPENSSH PRIVATE KEY-----) and paste it as the VPS_SSH_KEY secret in GitHub.
-
Check GitHub Actions is running: https://github.com/CristianProdius/telegram-gym-bot/actions
-
Make a small test change:
echo "# Deployment test" >> README.md git add README.md git commit -m "test: Testing auto-deployment" git push origin main
-
Watch the deployment in GitHub Actions tab
- Make sure the SSH key is correctly added to GitHub secrets
- Verify the public key is in
/home/deploy/.ssh/authorized_keyson VPS - Check that
VPS_USERis set todeploy
- First SSH manually from your local machine to accept the host key:
ssh deploy@your-vps-ip
- SSH into VPS and check logs:
cd /home/deploy/telegram-gym-bot docker compose -f docker-compose.production.yml logs -f bot
- Repository not found: Make sure the repo is cloned on VPS first
- Scripts not executable: The workflow now handles this automatically
- Docker not installed: Run the vps-setup.sh script first
- Wrong directory: Ensure bot is in
/home/deploy/telegram-gym-bot
If auto-deployment isn't working, you can always deploy manually:
ssh deploy@your-vps-ip
cd telegram-gym-bot
git pull origin main
./scripts/deploy.sh✅ GitHub Actions shows green checkmark
✅ No error messages in the Actions log
✅ Bot responds to /start command in Telegram
✅ Docker containers are running on VPS
Check container status:
docker compose -f docker-compose.production.yml psAll containers should show "Up" status.