File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ set -euo pipefail
1313REPO_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
1414CLIENT_DIR=" $REPO_DIR /client"
1515SERVER_DIR=" $REPO_DIR /server"
16- NGINX_WEB_ROOT=" /var/www/coursehub"
16+ NGINX_WEB_ROOT=" /var/www/coursehub/client "
1717PM2_APP_NAME=" coursehub-backend"
1818
1919# ── Colours ─────────────────────────────────────────────────
@@ -50,6 +50,9 @@ deploy_frontend() {
5050 # Clear old build and copy new one
5151 sudo rm -rf " ${NGINX_WEB_ROOT:? } " /*
5252 sudo cp -r " $CLIENT_DIR /dist/." " $NGINX_WEB_ROOT /"
53+ log " Reloading nginx..."
54+ sudo systemctl reload nginx
55+ sudo nginx -s reload
5356
5457 success " Frontend deployed successfully!"
5558}
@@ -96,6 +99,9 @@ case "$TARGET" in
9699 log " Replacing files in $NGINX_WEB_ROOT ..."
97100 sudo rm -rf " ${NGINX_WEB_ROOT:? } " /*
98101 sudo cp -r " $CLIENT_DIR /dist/." " $NGINX_WEB_ROOT /"
102+ log " Reloading nginx..."
103+ sudo systemctl reload nginx
104+ sudo nginx -s reload
99105 success " Frontend deployed!"
100106
101107 # Backend
You can’t perform that action at this time.
0 commit comments