KaTeX / KaTeX

Fast math typesetting for the web.
https://katex.org
MIT License
18.27k stars 1.18k forks source link

Setup website `Deploy Preview` for the PR #1510

Closed ylemkimon closed 6 years ago

ylemkimon commented 6 years ago

netlify.com is a CI for websites, which provides a deploy preview:

Deploy Preview: Deploy generated from a pull request or merge request, building the site as it would be if the proposed changes were merged. Deploy Previews are published to a URL which has the prefix deploy-preview followed by the identifier number of the pull request or merge request. For example, pull request #42 will automatically trigger a Deploy Preview at deploy-preview-42--yoursitename.netlify.com.

Websites using docusarus can be deployed using following configuration:

CC @kevinbarabash

kevinbarabash commented 6 years ago

Being able to easily check documentation changes before merging would be awesome.

kevinbarabash commented 6 years ago

I have it deploying to https://katex.netlify.com/katex/. I guess I have to set the CONTEXT variable to get it to deploy to https://katex.netlify.com.

kevinbarabash commented 6 years ago

The CONTEXT variable is supposed to be set automatically so I'm not sure why we're not picking it up. I'm going to try the BASE_URL environment variable instead.

ylemkimon commented 6 years ago

@kevinbarabash Please check the publish directory is website/build/KaTeX.

kevinbarabash commented 6 years ago

I set it to website/build... trying website/build/KaTeX now.

kevinbarabash commented 6 years ago

@ylemkimon that did the trick, thanks. https://katex.netlify.com

kevinbarabash commented 6 years ago

I've also turned on branch deploys so this should trigger a deploy next time someone creates a PR or updates one. 🤞

kevinbarabash commented 6 years ago

I've updated one of our open PRs. There's now a netlify checking that shows up. Clicking on the "details" link goes to the preview site. In this case it's https://deploy-preview-1485--katex.netlify.com.

screen shot 2018-07-29 at 3 16 52 pm