shashidharak99 commited on
Commit
e191448
·
verified ·
1 Parent(s): f245764

Create update.sh

Browse files
Files changed (1) hide show
  1. update.sh +21 -0
update.sh ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ cd /app/project
4
+
5
+ echo "Pulling latest code..."
6
+
7
+ git pull origin main
8
+
9
+ echo "Installing dependencies..."
10
+
11
+ npm install
12
+
13
+ echo "Building app..."
14
+
15
+ npm run build
16
+
17
+ echo "Restarting server..."
18
+
19
+ pkill -f "serve -s build"
20
+
21
+ nohup npx serve -s build -l 7860 &