| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Web service responses to GitHub Webhook.
This is not a Hello Word teaching example, but an actual project that I am using myself. Suppose you already know the following techniques or meet their conditions:
Both are located in the config directory, refer to *_demo.json, add a version without _demo
You can create a corresponding configuration for each warehouse and branch:
{
"webhook-test_master": { // RepositoryName_BranchName
"secret": "GitHub_Webhook_secret",
"cwd": "/home/jason/testapi/", // script execution directory
"command": "/bin/bash ./deploy.sh", // Really work shell script
"env": { // some environment variables
"DEBUG": "s:*"
}
}
}Currently, the SMTP configuration information is mainly stored for sending notification emails:
{
"mailConfig": {
"host": "email-smtp.us-west-2.amazonaws.com",
"port": "465",
"user": "user123",
"password": "password123",
"from": "from@gmail.com",
"to": "to@gmail.com"
}
}For GitHub Webhook, remember to generate a secret and select the json format.
For shell scripts warn/error, which is not important, can be transferred from stderr to stdout via 2>&1.
For the mail service, I'm using Amazon SES. Everything is going well with 200 free mail quotas per day.
If you have a problem, ask Google and yourself; It works fine in my side.
| Back | FazBrowse Home | New Git URL |