thumb
km0 3 years ago
parent b82f5d1c7b
commit 52bc20f017

@ -122,9 +122,9 @@ def sendStaticFiles(project, filename):
@app.route(f'/{base_url}/hook/', methods=['GET', 'POST'])
def pull():
if request.method == 'POST':
post_data = json.loads(request.form['payload'])
stream = os.popen('git pull')
output = stream.read()
import subprocess
output = subprocess.call(['sh', '/home/kamo/public_html/update.sh'])
print(output)
return output
return 'GET method not supported'

@ -0,0 +1,2 @@
cd /home/kamo/public_html
git pull
Loading…
Cancel
Save