Skip to content

suhay/github-webhooks-listener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Webhooks Listener

Python 3.8

A simple listener that will trigger custom scripts when it receives events from GitHub.

Usage

$ git clone git@github.com:suhay/github-webhooks-listener.git
$ cd github-webhooks-listener
$ python setup.py install --user

.env file

API_TOKEN=YOUR_GITHUB_SECRET

Repo configuration files

.
├── README.md
└── sites
    └── my-site.json
my-site.json

{
  "path": "/home/code/my-site",
  "release": {
    "build": "yarn && yarn build",
    "deploy": "rsync -av --delete public/ /var/www/html/my-site"
  }
}

Adding listener to GitHub Webhooks

As of v0.1.0 - Only the release event is supported.

https://{domain}/webhooks/{repo}
or
https://yoursite.com/webhooks/my-site

The repo name must match the repository name (minus the user/org name) sent from GitHub and also the respective .json file that contains its custom scripts.

About

A simple listener that will trigger custom scripts when it receives events from GitHub.

Topics

Resources

License

Stars

Watchers

Forks