deployment-dcdn/assets/webhook.sh

12 lines
411 B
Bash

#!/bin/bash
repo_name=$1
cd /var/www/repositories/$repo_name
git pull origin prod
tmux send-keys -t directus C-c
npm install -y
npx nuxt telemetry disable
npm run build
tmux send-keys -t front C-c
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