deployment-dcdn/assets/webhook.sh

11 lines
428 B
Bash
Raw Normal View History

2024-02-25 19:17:44 +01:00
#!/bin/bash
2024-02-26 12:34:20 +01:00
repo_name=$1
2024-02-27 16:57:10 +01:00
cms_dir=$(ls -d /var/www/repositories/cms*/)
tmux send-keys -t directus C-c
2024-02-26 18:00:57 +01:00
tmux send-keys -t front C-c
2024-02-27 16:57:10 +01:00
cd /var/www/repositories/$repo_name &&\
git pull origin prod &&\
NUXT_TELEMETRY_DISABLED=1 ; npm install -y &&\
npm run build &&\
2024-02-27 13:16:17 +01:00
tmux send-keys -t front "cd /var/www/repositories/${repo_name} && node .output/server/index.mjs" C-m
tmux send-keys -t directus "cd ${cms_dir} && npx directus start" C-m