-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdeploy.sh
More file actions
28 lines (24 loc) · 713 Bytes
/
deploy.sh
File metadata and controls
28 lines (24 loc) · 713 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
# attempt automatic deployment
echo "--- Starting automatic deployment... please take a deep breath :) ---"
cd /var/www/PayWay
echo "--- Entered PayWay directory ---"
git fetch
echo "--- git fetched ---"
# if something is up
git checkout .
git checkout master
echo "--- checked out master branch ---"
git pull
echo "--- git pulled ---"
npm install
echo "--- npm installed in root dir ---"
cd frontend
npm install
echo "--- npm installed in frontend ---"
npm run build
echo "--- Completed frontend production build ---"
node postBuildScript
echo "--- POST BUILD SCRIPT COMPLETE ---"
echo "--- Automatic deploy finished! Let's crack open a cold beer and enjoy this moment! ---"
pm2 restart paywayapp