Skip to content

Instantly share code, notes, and snippets.

@scanterog
Last active October 2, 2017 03:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scanterog/8639b74d1ba077f132675e9712465cf3 to your computer and use it in GitHub Desktop.
Save scanterog/8639b74d1ba077f132675e9712465cf3 to your computer and use it in GitHub Desktop.
import os
from aiohttp import web
async def build():
os.system('git pull')
os.system('rm -rf doc')
os.system('/docker/docker -I -c default --extras addHeader,noFiles'
' -x node_modules')
os.system('cp -r images doc')
print("Building has finished!")
async def handle(request):
request.app.loop.create_task(build())
return web.Response(text='{"message": "ok"}',
content_type='application/json')
app = web.Application()
app.router.add_post('/', handle)
web.run_app(app)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment