R
Railwayβ€’13mo ago
jimbobjunior

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
Percy
Percyβ€’13mo ago
Project ID: b5b8b5dd-ede7-45e7-93a7-4b369707abc8
root
rootβ€’13mo ago
Are you running it as a cron job? Can you share the code? What do the logs say?
jimbobjunior
jimbobjuniorOPβ€’13mo ago
b5b8b5dd-ede7-45e7-93a7-4b369707abc8
jimbobjunior
jimbobjuniorOPβ€’13mo ago
so this is my code: simply calls two functions to update the codebase and then calls an auto push to github function.
No description
jimbobjunior
jimbobjuniorOPβ€’13mo ago
i will run this code and let you know what the logs say
jimbobjunior
jimbobjuniorOPβ€’13mo ago
the deploy logs print nothing... they just have this:
No description
jimbobjunior
jimbobjuniorOPβ€’13mo ago
but i think this is a problem with the way ive set up the environment? do i need to turn a debugging mode on?
root
rootβ€’13mo ago
You should probably take a look at https://docs.railway.app/reference/cron-jobs for this - just stick it in its own script & run
Railway Docs
Cron Jobs | Railway Docs
Documentation for Railway
jimbobjunior
jimbobjuniorOPβ€’13mo ago
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
Want results from more Discord servers?
Add your server