使用git部署网站
(Someone said a coder who’s blog is full of “using some tools to do sth” is totally unreliable….)
大致方法是创建一个bare repository,然后利用hook脚本在每次push时更新网站内容。
##服务端
创建git用户和,禁用shell登陆
|
选一个喜欢的目录建立bare repository
|
之后便获取本地公钥,设置authorized_keys,之后网站更新时只要git push到repository即可。
发布于
tags:
{ git }