git GIT_WORK_TREE post-receive hook deployment remote

前端 未结 3 1144
有刺的猬
有刺的猬 2020-12-29 16:35

I\'m trying to use this post-recieve hook to update my live server

GIT_WORK_TREE=/var/www/www.example.org git checkout -f

This hook is on the re

3条回答
  •  佛祖请我去吃肉
    2020-12-29 17:35

    You will have to update your post-receive hook to get the files from the checkout folder in your git server and scp it to your live server.

    GIT_WORK_TREE=/home/temp git checkout -f
    scp -r /home/temp user@liveserver:/var/www/www.example.org
    

提交回复
热议问题