Este es un enlace posterior a la actualización (lo tomó de aquí ), lo he configurado en el repository simple en un server. Despliega todo el repository en la ruta en GIT_WORK_TREE
:
#!/bin/sh export GIT_WORK_TREE=/path/to/you/live/files git checkout -f
¿Cómo configurar un gancho post-actualización en Git para desplegar solo la carpeta dist / del repository?
Pruebe esto, base uno esta respuesta :
#!/bin/sh cd /path/to/you/live/files git archive --remote=<repo_url> <branch> dist | tar xvf -