How to auto-push to github and hence auto-deploy daily
hi everybody π
i have a script which updates some files in my codebase daily, then automatically pushes it to github and then hence re-deploy every day.
however, it doesn't seem to be pushing to github at all. im pretty sure my script is fine because when i run it locally, the script is working perfectly. i think it's something to do with permissions in railway.
does anyone know why/how to fix it?
10 Replies
Project ID:
b5b8b5dd-ede7-45e7-93a7-4b369707abc8
Are you running it as a cron job? Can you share the code? What do the logs say?
b5b8b5dd-ede7-45e7-93a7-4b369707abc8
so this is my code:
simply calls two functions to update the codebase and then calls an auto push to github function.
i will run this code and let you know what the logs say
the deploy logs print nothing... they just have this:
but i think this is a problem with the way ive set up the environment? do i need to turn a debugging mode on?
You should probably take a look at https://docs.railway.app/reference/cron-jobs for this - just stick it in its own script & run
or use a scheduled GitHub action: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
GitHub Docs
Events that trigger workflows - GitHub Docs
ill look into those, thanks π
its frustrating tho cos the function works when i run it locally but doesn't work when it is deployed