ianstormtaylor / slate

A completely customizable framework for building rich text editors. (Currently in beta.)
http://slatejs.org
MIT License
29.97k stars 3.25k forks source link

Deploy Preview for PRs #1892

Closed zhujinxuan closed 6 years ago

zhujinxuan commented 6 years ago

Do you want to request a feature or report a bug?

feature

What's the expected behavior?

After submitting a PR, a bot shall deploy a slateJS example for previewing the changes made by PR.

Recently I submit a PR in ant-design. I find that they are using netlify.com; So each time after submitting a commit, then it will use netlify.com to deploy a example-site based on that PR (like https://github.com/ant-design/ant-design/pull/10470#issuecomment-388249349). When new commits comes to the PR, the deployed example will be automatically updated.

Then we can easily understand that changes made by the PR by viewing the provided deploy preview.

ianstormtaylor commented 6 years ago

Sounds very cool! What is the process for setting that up?

renchap commented 6 years ago

I can help a bit with it, I set up Netlify for another project. Basically you just need to create an account on Netlify, connect it to the repository, and enter the commands needed to build the website, as well as the path to the HTML output. They will then deploy it to a .netlify.com url.

Once it is done, you can set it up (in the GUI) to automatically run the build for every PR, and have their bot post the URL to the build result in the PR.

You can also add other people to the Netlify project, so if you prefer you can delegate this to somebody else once you did the project creation / repository pairing.

zhujinxuan commented 6 years ago

Great! I see the preview in the tests now~.