简体   繁体   English

如何将插件部署到Heroku

[英]How to deploy a plugin to Heroku

I'm writing a Wordpress plugin and I'm trying to figure out how I can deploy it to Heroku. 我正在编写一个Wordpress插件,试图弄清楚如何将其部署到Heroku。

The plugin is version controlled with git, but it needs to be installed in a site in order to run/test. 该插件受git版本控制,但需要安装在站点中才能运行/测试。 When I try to deploy the entire site using git, only the site gets deployed, but the nested git directory (for my plugin) is ignored. 当我尝试使用git部署整个站点时,只会部署该站点,但是嵌套的git目录(对于我的插件)将被忽略。 I considered setting it up as a git submodule, but according to the Heroku docs that won't work either. 我考虑过将其设置为git子模块,但根据Heroku文档,该方法也不起作用。

What do I do? 我该怎么办? Surely there must be a way to deploy to Heroku when you're git repository doesn't live in the root directory of the project. 当您的git信息库不在项目的根目录中时,肯定有一种方法可以部署到Heroku。

I don't recommend deploying Wordpress to Heroku, but it turns out the documentation I was reading was old. 我不建议将Wordpress部署到Heroku,但是事实证明我正在阅读的文档过时。 Heroku will install git submodules, so the way to do it is to make your project a submodule and configure the git project in the document root. Heroku将安装git子模块,因此执行此操作的方法是使您的项目成为子模块,并在文档根目录中配置git项目。 Warning: Git submodules suck. 警告:Git子模块很烂。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM