auto deploy

This commit is contained in:
w-mj
2020-02-11 12:12:37 +08:00
parent 83286def5f
commit 7108823aae
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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
View File
@@ -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)