简体   繁体   中英

How do I run a GitHub Webhook after my Github Action's Workflow has finished?

Currently my GitHub Webhook is set up to deploy my website every time a push on master branch occurs. Now, with GitHub Actions in place for CI, I want to run this Webhook only if my CI on GitHub succeeds.

Can I tell my GitHub Webhook to wait for GitHub's CI or shouldn't I use a Webhook anymore but manage this behavior in my GitHub workflow?

A webhook is a listener which is trigger by a specific JSON payload.

You could:

  • modify your listener to detect a different payload
  • send that different payload from your GitHub Action

That way, your local deployment process will be called by your GitHub Action.
If that deployment was not a local one (meaning on your server instead of a server accessible from GitHub), there are quite a list of GitHub Actions dedicated to Deploy a site . In that case, no need for a webhook.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM