From ddf7b27a9ee2f9f91d280e185f855f7907c4d910 Mon Sep 17 00:00:00 2001
From: "Jiang, Weiming (PG/T - Comp Sci & Elec Eng)" <wj00162@surrey.ac.uk>
Date: Sun, 21 May 2023 07:12:36 +0000
Subject: [PATCH] Update .gitlab-ci.yml

---
 .gitlab-ci.yml | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3c79685..de02fa3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -41,13 +41,14 @@ lint-test-job:   # This job also runs in the test stage.
     - sleep 10
     - echo "No lint issues found."
 
-deploy-job:      # This job runs in the deploy stage.
-  stage: deploy  # It only runs when *both* jobs in the test stage complete successfully.
+deploy-job:      
+  stage: deploy  
   environment: production
   script:
-    - "echo 'Deploying the application'"
-    - "python -m pip install -r requirements.txt" 
-    - "python run.py"
-    - sleep 60
+    - echo 'Deploying the application'
+    - python -m pip install -r requirements.txt 
+    - python run.py &
+    - echo 'Server is running...'
+    - sleep 60  # Let the server run for a minute.
+    - echo 'Stopping server...'
     - pkill -f run.py
-
-- 
GitLab