zpnk / stage-ci

Automatic deploy previews for your PRs using zeit.co/now.

Home Page:https://stage.now.sh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Retry failed deploys

zpnk opened this issue · comments

commented

It would be nice to allow the user to trigger a retry of a failed deploy.

I would imagine this implemented as a url that gets set as the target_url on the GitHub error status, with a description of, "Deploy failed, please try" or similar.

To trigger a deploy, we need information about the repo, as well as branch data (ref/sha). This info is included the the initial GitHub pull request event. But it seems we could fetch this data as needed through the GitHub pull request endpoint.

So we could have an endpoint like /retry?repo=zpnk/hello-world&pr=20 that gets set as the GH status in event of an error. This endpoint would get the necessary repo/git info from the GH PR api and retry the deploy.