mirror of
https://github.com/SqrtMinusOne/sqrtminusone.github.io.git
synced 2025-12-11 16:13:03 +03:00
feat: cwd in deployer
This commit is contained in:
parent
a287df963a
commit
b4f8cb4567
1 changed files with 7 additions and 2 deletions
|
|
@ -19,7 +19,12 @@ def create_app():
|
||||||
@app.route('/', methods=['POST'])
|
@app.route('/', methods=['POST'])
|
||||||
@auth.login_required
|
@auth.login_required
|
||||||
def deploy():
|
def deploy():
|
||||||
subprocess.run(['git', 'fetch', 'origin'])
|
subprocess.run(
|
||||||
subprocess.run(['git', 'checkout', 'origin/gh-pages'])
|
['git', 'fetch', 'origin'], cwd=os.environ.get('CWD', None)
|
||||||
|
)
|
||||||
|
subprocess.run(
|
||||||
|
['git', 'checkout', 'origin/gh-pages'],
|
||||||
|
cwd=os.environ.get('CWD', None)
|
||||||
|
)
|
||||||
|
|
||||||
return app
|
return app
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue