Does my repository have to be public?
You can keep a bot’s source private. On Bothosting, every plan, including Spark, can fetch a private GitHub branch with a read credential. The repository must fit that deployment’s storage allocation.
For a private repository, use its HTTPS clone URL, select the exact branch and save the credential in GIT_TOKEN. Keep it out of the clone URL and the source archive. The bot also needs its own runtime credentials, such as a Telegram token. Access to the source and access to the messaging provider are independent.
What makes a push trigger a deployment?
Fetching the repository supplies code. To deploy on push, also connect the repository and branch in Deploy, then add the supplied webhook URL and signing secret to GitHub. Select push events. GitHub delivers an event to that URL when a matching change is pushed. A successful initial ping checks delivery to the host. It has no new application revision to run. GitHub’s guide to webhook deliveries.
How can I tell which copy is running?
Change a test command’s reply from “build one” to “build two” on the connected branch. Compare the new commit ID with Recent deploys and wait for its outcome. Then invoke that command in a test chat. If the delivery arrived but checkout failed, check the branch name and the repository credential. If the commit matches but the reply is old, check the entry file and whether another process still uses that bot identity.
For file uploads, repeat the test after uploading the changed source and restarting it. See the GitHub deployment instructions for the exact settings.