Skip to content

Commit 39725fc

Browse files
committed
docs: Add deployment and GitHub configuration guide
Resolves #125
1 parent c18ee0e commit 39725fc

File tree

1 file changed

+66
-7
lines changed

1 file changed

+66
-7
lines changed

README.md

Lines changed: 66 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,52 @@ A webhook to forward GitHub events to StreamLabs Alerts and Twitch Chat.
1717

1818
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)
1919

20-
## Manual deploy
20+
21+
## Setup
2122

22-
```
23-
git clone https://github.com/streamdevs/webhook.git
24-
cd webhook
25-
yarn
26-
yarn start
27-
```
23+
There are a few requirements for the integration to work.
24+
25+
- [ ] Your webhook is on a server, running 24/7
26+
- [ ] Your webhook is able to receive HTTP requests from GitHub/GitLab.
27+
- [ ] Your repository (and/or user/organisation) on GitHub/GitLab is configured to notify your
28+
webhook
29+
30+
You can deploy this webhook in different ways
31+
32+
### Deploy to Heroku
33+
34+
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)
2835

2936
## Configuration
37+
### Deploy to your own server
38+
39+
0. Get the source code
40+
```
41+
git clone https://github.com/streamdevs/webhook.git
42+
```
43+
0. Change into the source code directory
44+
```
45+
cd webhook
46+
```
47+
0. Install the dependencies with yarn (or alternative you can use `npm`)
48+
```
49+
yarn install
50+
```
51+
```
52+
0. Create a .env file with your (configuration)[#configuration] and the edit it
53+
```
54+
cp .env.example .env
55+
```
56+
0. Compile the project to JavaScript
57+
```
58+
yarn build
59+
```
60+
0. Run the start command
61+
```
62+
yarn run start
63+
```
64+
0. You should see your webhook running on the port specified in the configuration below
65+
3066
3167
We make use of the following environment variables:
3268
@@ -45,6 +81,29 @@ We make use of the following environment variables:
4581
4682
### For sponsorships
4783
84+
### GitHub Configuration
85+
86+
#### Repositories
87+
88+
0. Open your repository settings on GitHub.
89+
0. Go to the **Webhooks** section.
90+
0. Click on **Add webhook**.
91+
0. On the **Payload** field, enter the GitHub endpoint for your deployed webhook. For example `https://YOUR-SITE-HERE.herokuapp.com/github`.
92+
0. For **Content type** we want to select `application/json`.
93+
0. On **Which events would you like to trigger this webhook?** select `Let me select individual
94+
events`.
95+
0. On the list of events check the following:
96+
- Check runs
97+
- Forks
98+
- Issues
99+
- Pull requests
100+
- Releases
101+
- Stars
102+
0. Make sure the `Active` checkbox is checked
103+
0. Click on `Add webhook`
104+
0. You will receive your first notification on Twitch Chat and StreamLabs letting you now your webhook has been configured correctly.
105+
106+
48107
[Check the GitHub documentation](https://help.github.com/en/github/supporting-the-open-source-community-with-github-sponsors/configuring-webhooks-for-events-in-your-sponsored-account)
49108
50109
## Contributing

0 commit comments

Comments
 (0)