deployment-dcdn/assets/webhook.sh

12 lines
411 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-26 18:00:57 +01:00
cd /var/www/repositories/$repo_name
2024-02-25 22:18:51 +01:00
git pull origin prod
tmux send-keys -t directus C-c
2024-02-27 13:16:17 +01:00
npm install -y
npx nuxt telemetry disable
npm run build
2024-02-26 18:00:57 +01:00
tmux send-keys -t front C-c
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
cms_dir=$(ls -d /var/www/repositories/cms*/)
tmux send-keys -t directus "cd ${cms_dir} && npx directus start" C-m