auto deploy
This commit is contained in:
@@ -3,4 +3,4 @@
|
||||
git checkout -- .
|
||||
git pull origin master
|
||||
python3 manage.py collectstatic --noinput
|
||||
ssh -i ~/Login_tencent root@127.0.0.1 "supervisorctl restart website"
|
||||
ssh root@127.0.0.1 "supervisorctl restart chatbot"
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ def deploy(request):
|
||||
if event_type == 'ping':
|
||||
return HttpResponse('pong!')
|
||||
if event_type == 'push':
|
||||
# os.system('cd /web-server/cloud-server/ && bash deploy.sh')
|
||||
os.system('cd /web-server/cloud-server/ && bash deploy.sh')
|
||||
return HttpResponse('deploy.')
|
||||
|
||||
return HttpResponseServerError('Operation not supported.', status=502)
|
||||
|
||||
Reference in New Issue
Block a user