Last active
October 2, 2017 03:16
-
-
Save scanterog/8639b74d1ba077f132675e9712465cf3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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