deployment-dcdn/assets/webhook.sh

11 lines
428 B
Bash

#!/bin/bash
repo_name=$1
cms_dir=$(ls -d /var/www/repositories/cms*/)
tmux send-keys -t directus C-c
tmux send-keys -t front C-c
cd /var/www/repositories/$repo_name &&\
git pull origin prod &&\
NUXT_TELEMETRY_DISABLED=1 ; npm install -y &&\
npm run build &&\
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