将Ghost站点部署到裸露的远程git仓库

时间:2017-03-11 21:18:31

标签: git gruntjs ghost

我的服务器上有一个裸仓库,我试图将本地Ghost站点推送到。

在服务器上,Ghost grunt init无法成功完成,因为没有工作树:

$ grunt init

Running "update_submodules:default" (update_submodules) task
Warning: fatal: /usr/lib/git-core/git-submodule cannot be used without a working tree. Use --force to continue.

我怀疑解决这个问题的方法是在本地完成所有grunt工作,并避免gitignore构建的结果。如果是这样,任何人都可以提供一些有关从Ghost中删除的内容的一些见解gitignore吗?

我的偏好是在推送后在服务器上运行grunt。有没有什么方法可以让这个可以用于裸机库?

1 个答案:

答案 0 :(得分:2)

事实证明我正在考虑这种倒退。我试图将本地仓库推送到服务器上的裸机go仓库,但是......

首选方法是直接在服务器上安装Ghost版本。

示例:

$ sudo wget https://ghost.org/zip/ghost-latest.zip

从那里你将解压缩并执行标准的设置命令。

Digital Ocean has a great guide向您展示如何:

  1. 直接将Ghost版本安装到Ubuntu
  2. 编辑Ghost配置文件
  3. 使用Nginx的代理
  4. 使用foreverpm2
  5. 等模块永久启动博客服务器

    I wrote a post on the Ghost blog I was able to set up as a result, providing a few more details