project_name=$1
# tag=$2
target_user='root'
target_ip='172.29.2.3'
target_dir="/home/quant_group/${project_name}"
deploy_dir="/home/quant_group/qa-deploy-utils"


ssh ${target_user}@${target_ip} "cd ${target_dir} "
ssh ${target_user}@${target_ip} "git pull"
ssh ${target_user}@${target_ip} "npm install"
ssh ${target_user}@${target_ip} "npm run build"
ssh ${target_user}@${target_ip} "supervisorctl restart ${project_name}"

echo "done"
