Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving online document build process. #11252

Open
trivialfis opened this issue Feb 13, 2025 · 2 comments
Open

Improving online document build process. #11252

trivialfis opened this issue Feb 13, 2025 · 2 comments
Labels

Comments

@trivialfis
Copy link
Member

trivialfis commented Feb 13, 2025

This is a short note in companion with https://github.com/dmlc/xgboost/blob/master/doc/contrib/docs.rst#read-the-docs .

There are subtle differences between building docs for PR and for dmlc branches, including release branches and the master branch. The RTD build process is run twice, the first triggered by the GitHub webhook and the second by XGBoost GitHub action using the REST API. We can't avoid the first run as the webhook has to be enabled. Otherwise, RTD doesn't generate an online document for the previous.

Using the REST API requires an RTD token. However, since PR doesn't have permission to read GitHub secret, the token is managed by GitHub and retrieved by the AWS secret manager during the build.

For PR branches, the first run will fetch possibly outdated pre-built R and JVM docs from the master branch's s3 bucket. It can do so by parsing the master branch's commit history. Then, the second run will access the correct artifact.

For the release branches and the master branch, the first run will result in a partial document as there's no fallback option.

Ideally, we should eliminate the first run altogether as it's useless. These are some potential solutions we can look into:

  • A feature request for RTD to integrate the build trigger with GitHub action.
  • Use an independent website for non-sphinx documents, and hardcode the links in our sphinx doc.
  • Use an independent website for all the doc.
  • Integrate the doc build into RTD, maybe with some help from Conda for binary R packages.
@trivialfis
Copy link
Member Author

cc @hcho3 for vis.

We can look into this after the next release. The current hack is not manageable.

@trivialfis
Copy link
Member Author

Cc @david-cortes regarding the previous confusion about missing docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant