mirror of
https://github.com/SqrtMinusOne/sqrtminusone.github.io.git
synced 2025-12-10 15:53: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'])
|
||||
@auth.login_required
|
||||
def deploy():
|
||||
subprocess.run(['git', 'fetch', 'origin'])
|
||||
subprocess.run(['git', 'checkout', 'origin/gh-pages'])
|
||||
subprocess.run(
|
||||
['git', 'fetch', 'origin'], cwd=os.environ.get('CWD', None)
|
||||
)
|
||||
subprocess.run(
|
||||
['git', 'checkout', 'origin/gh-pages'],
|
||||
cwd=os.environ.get('CWD', None)
|
||||
)
|
||||
|
||||
return app
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue