deployment-dcdn/assets/webhook.sh

16 lines
509 B
Bash
Raw Normal View History

2024-02-25 19:17:44 +01:00
#!/bin/bash
username=$(getent passwd 1000 | cut -d: -f1)
2024-02-25 22:18:51 +01:00
cd /home/$username
directories=$(find . -maxdepth 1 -type d -printf "%f\n")
for dir in $directories; do
if [[ ! "$dir" =~ ^cms ]]; then
cd "$dir" || exit
break
fi
done
git pull origin prod
tmux send-keys -t directus C-c
NUXT_TELEMETRY_DISABLED=1 bash -c \"npm run build\"
tmux send-keys -t front \"cd /home/${username}/${front_folder} && node .output/server/index.mjs\" C-m
tmux send-keys -t directus \"npx directus start\" C-m