deployment-dcdn/assets/webhook.sh

10 lines
327 B
Bash

#!/bin/bash
username=$(getent passwd 1000 | cut -d: -f1)
repo_name=$1
cd /home/$username/$repo_name
git pull origin prod
tmux send-keys -t directus C-c
npm i
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