Skip to content

DOC: Preview rendered documentation of PRs #50832

Closed
@datapythonista

Description

@datapythonista

The idea is that when someone opens a PR 12345, after the CI finishes building the docs, we have a url https://pandas.pydata.org/docs/dev/pr/12345/ (we can probably think of a better url) to preview how are the docs with the pr changes.

We discussed this long ago, and couldn't find an easy way to implement it with the CI. The main challenge is that the CI of a PR doesn't have access to secrets, so we can't publish to a server in the same way we do for commits to main. But we've got options, like to add a webhook to the CI, and implement a small service in a server, that when it receives a request from a webhook, it finds the artifact for that job, downloads and decompresses it to a directory, which is served as a static http server to the desired url.

We will need a job to clean up docs after X days, since each copy of our web/docs is around 350M, but that should be easy.

In the future we can even try to detect where the changes happened, and add a comment to the PR with the links to the pages of interest. Not sure how difficult would that be for docstrings, but for regular rst files (e.g. the user guide) it should be quite easy.

Please let me know if there are ideas, or any objection. Otherwise I'll give this a try in few days.

Metadata

Metadata

Labels

CIContinuous IntegrationDocs

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions