在 GitHub 中为 ReadTheDocs 添加 WebhooK

在 GitHub 中为 ReadTheDocs 添加 WebhooK

转载: 这里

  • Go to the Settings page for your project

  • Click Webhooks > Add webhook

  • For Payload URL, use the URL of the integration on Read the Docs, found on the project’s Admin > Integrations page. You may need to prepend https:// to the URL.

  • For Content type, both application/json and application/x-www-form-urlencoded work

  • Leave the Secrets field blank

  • Select Let me select individual events, and mark Branch or tag creation, Branch or tag deletion and Pushes events

  • Ensure Active is enabled; it is by default

  • Finish by clicking Add webhook. You may be prompted to enter your GitHub password to confirm your action.

You can verify if the webhook is working at the bottom of the GitHub page under Recent Deliveries. If you see a Response 200, then the webhook is correctly configured. For a 403 error, it’s likely that the Payload URL is incorrect.

GitHub will emit an initial HTTP request (X-GitHub-Event: ping) upon creating the webhook and you may notice that the Read the Docs responds with {"detail":"Unhandled webhook event"} – this is normal and expected. Push changes to your repository and webhooks will work from this point.

Note: The webhook token, intended for the GitHub Secret field, is not yet implemented.

你可能感兴趣的:(技术文档,其他)