zpnk / stage-ci

Automatic deploy previews for your PRs using zeit.co/now.
https://stage.now.sh
MIT License
131 stars 23 forks source link

Adopt Github Deployments #26

Closed paulirish closed 7 years ago

paulirish commented 7 years ago

fixes #17

This was pretty straightforward. Here's an example PR where I was using this: https://github.com/paulirish/hello-world/pull/3#event-1108946827

Pending State: image

Completed: image

And I definitely prefer this setup based on deployments rather than commit statuses. It's very visible, whereas once the commit status's all pass, that gets hidden by Github.

Configurability:

cc @mxstbr


As a driveby I changed the alias from branch ref to PR number. I can see the argument for keeping things as they were, so no big deal if you guys want to revert that. :)

mxstbr commented 7 years ago

YES this is awesome @paulirish! Can't wait to upgrade 🙌

creichert commented 7 years ago

I think this looks really good. Only thing I would add is possibly adding a second value of application/json to the Accept header behind the ant-man preview. I'm not really sure how github handles that once they've made it a mainline feature (hopefully soon) but it might be prudent.

Either way, awesome work!

paulirish commented 7 years ago

Only thing I would add is possibly adding a second value of application/json to the Accept header behind the ant-man preview.

Works for me. Done.

Also added a fix that means pull requests based on branches on other remotes can work now. Beforehand the branch clone failed because it wasn't local to origin (more or less). Now, we clone the pull request's repo and build that.

zpnk commented 7 years ago

Thanks for this @paulirish, nice work! Really like how the deployments look in the GH ui, much more visible/usable than commit statuses.

Good catch on the remote branch issue, glad to get that fix in there. 👍

On the alias name - I think I prefer the branch name over a PR number but I'm definitely open to feedback/thoughts on that. Could go either way tbh. Perhaps one day this could be configurable (somehow 😛 ).

I'll be testing this out a little bit, but it should be good to merge!

paulirish commented 7 years ago

I think I prefer the branch name over a PR number but I'm definitely open to feedback/thoughts on that.

sgtm. reverted that for now.

cheers. thanks for taking a look.

zpnk commented 7 years ago

@paulirish Everything looks great, I'm going to merge this in. Really appreciate your work on this feature! 👏