Preview of Documenter site for a PR branch

I regularly find myself searching for push_preview in the Documenter API to answer this very question. It’s a keyword argument to Documenter.deploydocs and it behaves as follows:

push_preview a boolean that specifies if preview documentation should be deployed from pull requests or not. If your published documentation is hosted at "https://USER.github.io/PACKAGE.jl/stable, by default the preview will be hosted at "https://USER.github.io/PACKAGE.jl/previews/PR##". This feature works for pull requests with head branch in the same repository, i.e. not from forks.

3 Likes