Git推送到远程仓库,但不会在实时网站文件夹中部署代码

时间:2016-08-07 17:45:38

标签: git ssh

我正在尝试使用git首次将网站部署到我的实时服务器,我一直关注this tutorial。当我推送到现场网站时,所有内容都会上传到/repos/my-website.git文件夹,但我想查看网站的文件夹仍为空。

我认为收到后的工作树有问题吗?

在此文件夹中

/var/chroot/home/content/26/12629726/repos/my-website.git/hooks

我用vim设置了post-recieve

vi post-receive

#!/bin/sh
git --work-tree=/var/chroot/content/26/12629726/html/OTHER-WEBSITES/my-website --git-dir=/var/chroot/content/26/12629726/repos/my-website.git checkout -f

设置名为“live”的遥控器

git remote -v
live    ssh://user@my-website.com/~/repos/my-website.git/ (fetch)
live    ssh://user@my-website.com/~/repos/my-website.git/ (push)
origin  https://github.com/git-user/mywebsite.git (fetch)
origin  https://github.com/git-user/mywebsite.git (push)

当我推送一切都进入git文件夹     git push live master

Warning: Permanently added 'my-website.com,222.111.222.1' (DSA) to the list of known hosts.
Password:
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 395 bytes | 0 bytes/s, done.
Total 4 (delta 2), reused 0 (delta 0)
To ssh://user@my-website.com/~/repos/my-website.git/
   8fc9229..bb1042f  master -> master

此文件夹无法接收文件

/var/chroot/content/26/12629726/html/OTHER-WEBSITES/my-website

由于

0 个答案:

没有答案