使用 PHP 和 GitHub Webhooks 实现自动部署

Sep 28, 2015PHP, GitHubhttps://git.io/JeX2e

https://github.com/mdluo/github-webhook-handler-php

  • Add a weebhook in the Settings/Webhooks page of your respostory.
  • Update the $secret and $path in the github-webhook-handler.php.
  • Upload github-webhook-handler.php to your server and copy the URL to it.
  • Fill in the webhooks page.
  • ssh to your server.
#if you are using Apache as web server, change `www-data` to `www`
chown -R www-data /path/to/the/repository/
chmod -R g+s /path/to/the/repository/
cd /path/to/the/repository/
sudo -u www-data git pull

Powered by Gatsby. Theme inspired by end2end.

© 2014-2019. Made with by mdluo.