flaskr.py 412 B

12345678910111213141516171819202122
  1. """
  2. Website for Craftbroec RR stuff
  3. """
  4. from subprocess import call
  5. from flask import jsonify
  6. from app import app, webhook
  7. @app.route('/')
  8. def index():
  9. """Show index page"""
  10. return jsonify(True)
  11. @webhook.hook()
  12. @app.route('/deploy/<int:data>')
  13. def deploy(data):
  14. """Run deploy script"""
  15. return jsonify(True)
  16. call(["git", "pull"])
  17. call(["touch", "flask.wsgi"])
  18. return jsonify(True)