git init --bare nombre_hooks.git
cd nombre_hook.git/
cd hooks/
nano post-receive
#!/bin/sh # Checkout files git --work-tree=</dir_project> --git-dir=</dir_githook/nombre_hooks.git> checkout -f
. . . # Install dependencies cd /path cp parser.service /etc/systemd/system npm install . . .
. . . # Restart app systemctl daemon-reload systemctl restart parser.service
chmod +x nombre_hook.git/hooks/post-receive
Geshtue Dev © since 2010 (opens new window)
← Comandos Comunes