Automatically Deploy From GitHub To Server On Push

后端 未结 6 1649
陌清茗
陌清茗 2020-12-02 11:23

We have a VPS on linode, and code hosted on gitHub. How do we setup so when we push to gitHub, it also pushes automatically to our linode server. We are using PHP on the lin

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-02 11:53

    I wrote a small Github-Auto-Deploy server in python, that does exactly what you want.

    • Enter your domain to a new post-receive service hook on Github
    • Match local repository paths with repository urls in the config file
    • The server will receive requests from github and run git pull in local repository path
    • It also runs a shell script for deployment afterwards if you provide one

提交回复
热议问题