要将本地repo与服务器站点连接,我使用"手动或拉部署":https://docs.cpanel.net/knowledge-base/web-services/guide-to-git-deployment/
它第一次工作得超级顺利。但是当我继续做提交并将它们从github拖到我的网站时,"部署头提交";按钮停止工作…
写的原因是:
The system cannot deploy
For deployment, ensure that your repository meets the following requirements:
1. A valid .cpanel.yml file exists. For more information, read our documentation.
2. No uncommitted changes exist on the checked-out branch.
对于.cpanel。在Yml文件中,它绝对没问题,因为它第一次工作得很好,因为其中的所有指令都是按照预期制作的。
但是我不理解"未提交的更改"。我没有对我的签出分支做任何更改,我只是按照指令从github拉入它。那么它是关于什么的呢?
如何使部署再次工作?
我知道问题是。Yml文件不包含在git存储库中。如果你把它放在。gitignore中,没有问题,但不要这样做">
!确保您已输入。cpanel。使用以下命令将Yml导入存储库:
git add .cpanel.yml
git commit -m 'add .cpanel.yml even though it is ignored or maybe not added yet'
git push
要通过SSH认证或克隆GitHub存储库,请删除">
示例:使用"git@github.com:username/repository"而不是"git@github.com:username/repository.git">
请注意SSH(公共)密钥是必需的;库→设置→部署钥匙。
@Solomon Oki Ochepa - Oki Technologies Ltd.