Forums

Automatically git pull and reload webapp on PA

Hello, I am wondering if there are any way in which I can set up an automatic git pull & reload webapp over here. I have multiple development environments (code on the go and everywhere!) so I do not find convenient setting this up each time I open up my school PC (they whip the PC on each logout, tho they have git client preinstalled on login). Is there a way which when i push to github (using github webhooks) to have PA automatically pull the repo and reload the webapp? If there isn't an easy way to do it at this moment, is it possible if y'all implement a feature that does such thing? Thanks!

Hmm. We don't have any built-in support, but you could potentially create a second web app, which exposed just one URL (very unguessable, something like /SZzu5E8V8ydybClTrFtq) which, when hit, would use subprocess.check_call to do the git pull into the code tree for your original app, and then hit our API to trigger a reload.