How to push changes from GitHub Desktop to Cpanel

与世无争的帅哥 提交于 2019-12-10 11:46:10

问题


Is it possible to directly push changes to a cpanel repository from GitHub desktop software. Or first the repository changes will be pushed to the online repository on github.com and then from there the cpanel will fetch the changes by clicking Update from Remote & Deploy HEAD Commit


回答1:


One possibility would be to use a GitHub Action, that is a process able to run on GitHub side, triggered by a push.

For example, a deployment action, like one to publish to Netlify or zem

You would need to adapt such an action to push/publish to Cpanel, using an API key.




回答2:


  1. Clone the remote repository on your cPanel account to your local computer. git clone URL

  2. Create the .cpanel.yml file.

  3. Add the cPanel-managed repository as a remote. git remote add origin URL

  4. Push changes to the cPanel-managed repository. git push -u origin HEAD

For more information: https://documentation.cpanel.net/display/CKB/Guide+to+Git+-+How+to+Set+Up+Deployment



来源:https://stackoverflow.com/questions/58543916/how-to-push-changes-from-github-desktop-to-cpanel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!