Shell script to rebuild a Java webapp I am asking for an experienced person to review my basic shell script. I do not write them at work, but I am a software developer. I am using this for my personal project that I am working on. Later, it will be integrated with Docker and a CI server maybe Jenkins/Travis CI.

I am just looking for someone to tell me if I am not following best practices
or conventions, or if certain parts need to be changed/revised.

#!/bin/bash
PATH=$PATH:$(npm bin)
set -x
webapp="/Users/earzate/Development/Career/profile-page-app"
serverapp="/Users/earzate/Development/Career/profile-server-ws/app-server"

#build profile-page-app
cd $webapp
echo "Building ng page app"
ng build --prod
echo "ng page app build complete"

#build app-server
echo "Cleaning static sources"

#clean old static web files
cd "$serverapp/src/main/resources"
echo "Deletic static web resources"
rm -r static

#make new static directory
echo "Creating static directory"
mkdir static

#copy web resources from webapp into serverapp static directory
echo "Copying static resources into directory"
cp -r "$webapp/dist/."  "$serverapp/src/main/resources/static"

#copy secured objects from secured directory
#secured objects not versioned in git
cp "$serverapp/secured/name/private-key.p12" "$serverapp/src/main/resources"

echo "Building jar"
cd "$serverapp"
./gradlew build 

echo "Deploying app"
java -jar build/libs/app-server-0.0.1-SNAPSHOT.jar
Immediate security problem

Do you know which ng, cp, rm, gradlew does the script execute? You shouldn't rely on PATH.
Indirect security problem

rm and cp can fail midway, and you may end up deploying something unintended. Along the same lines, can ng produce something half-baked? Consider testing exit codes and act accordingly.
Every time you want to comment the behavior, consider factoring it into a well-named function, e.g.

recreate_static_directory() {
    cd "$1"
    echo "Deletic static web resources"
    rm -r static

    echo "Creating static directory"
    mkdir static

    echo "Copying static resources into directory"
    cp -r "$webapp/dist/."  "$1/static"
    cp "$serverapp/secured/emmanuel-arzate/private-key.p12" "$1"

I am not sure I follow the mix of cds and fully-qualified paths.