Preview of Documenter site for a PR branch

I have a repo on GitHub with Documenter deplored in the standard configuration. When a PR is created, a Documenter action is being run that seems to build the site for that branch, but I can’t figure out how to actually view it. Is this something I need to perform extra steps to configure, or is there a trick to it?

1 Like

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

If you mean “how to access this from the PR page”, one of the actions should be labelled “documenter/deploy”. If you click on “details” of this action, you should get redirected to the preview. For your PR here, the actions are hidden under “show all checks” and the “documenter/deploy” is the last action in the list.

Edit: I think you already figured it out, but I’ll keep the answer for future readers.

1 Like