Write to the github

I’m currently running my telgram bot written in python with Fly.io.
In this bot i will receive some information like a frase that will be append to a text file. That’s all fine when i’m running in my machine, but when running in Fly.io the text file in github don’t get updated.
Theres some way to do it right?

The issue is likely that your app doesn’t have authentication to GitHub.

That could be done in many ways:

  1. Add ssh keys to your app using secrets or machine files
  2. Add a personal account token to your app and use it on your repo origin.

I’ve just set the integration to the github to sync the deployment via actions.

Continuous Deployment with Fly.io and GitHub Actions · Fly Docs

Also set the fly token in the repository secret, just like the tutorial. But the information stiil not been send from the telegram bot to github text file, only the commits from github are been synchronized.

Im not sure I follow, can you explain a bit more of whats happening? Maybe sharing some logs?

My telegram bot basically lists some songs based on a user-submitted keyword. Another function is to let the user suggest a song to be analyzed and later added to the database. This suggestion must be written in a text file “suggestions.txt” which will be analyzed later.

When running on my machine (vs code), the bot works fine. The bot receives the suggestion text and writes it to the file. But after deploying with Fly, done via github, this functionality does not work correctly. The “suggestions.txt” file on github must have an append with the new suggestion.