neondaniel's picture
Initial implementation of demo running from GitHub package
9b804d7
raw
history blame
No virus
505 Bytes
from os import environ, chdir
from subprocess import run, PIPE
# Install Demo Application
run(["git", "clone",
f"https://{environ['GITHUB_TOKEN']}@github.com/neongeckocom/brainforge-webapp",
"-b", environ["GITHUB_BRANCH"]])
run(["pip", "install", "./brainforge-webapp"])
# Get Demo Commit ID
chdir("brainforge-webapp")
commit = run(["git", "rev-parse", "--short", "HEAD"], stdout=PIPE).stdout.decode('utf-8').strip()
environ["GH_COMMIT"] = commit
from brainforge_webapp.app import run
run()