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

Revert Revert "[Doc] Add Algolia search to docs" #47487

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion ci/ray_ci/doc/build_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def __init__(self, cache_dir: str):
"""
self._cache_dir = cache_dir

def upload(self) -> None:
def upload(self, dry_run: bool) -> None:
"""
Upload the build artifacts to S3
"""
Expand All @@ -40,6 +40,10 @@ def upload(self) -> None:
logger.info("Creating a tarball of the cache files.")
doc_tarball = self._zip_cache(cache_files)

if dry_run:
logger.info(f"Skipping upload of {doc_tarball} to S3.")
return

logger.info("Upload the tarball to S3.")
self._upload_cache(doc_tarball)

Expand Down
7 changes: 4 additions & 3 deletions ci/ray_ci/doc/cmd_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,24 @@ def main(ray_checkout_dir: str) -> None:
logger.info("Building ray doc.")
_build(ray_checkout_dir)

dry_run = False
if (
os.environ.get("BUILDKITE_PIPELINE_ID")
not in get_global_config()["ci_pipeline_postmerge"]
):
dry_run = True
logger.info(
"Not uploading build artifacts because this is not a postmerge pipeline."
)
return

if os.environ.get("BUILDKITE_BRANCH") != "master":
dry_run = True
logger.info(
"Not uploading build artifacts because this is not the master branch."
)
return

logger.info("Uploading build artifacts to S3.")
BuildCache(os.path.join(ray_checkout_dir, "doc")).upload()
BuildCache(os.path.join(ray_checkout_dir, "doc")).upload(dry_run=dry_run)

return

Expand Down
3 changes: 2 additions & 1 deletion doc/requirements-doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ setuptools>=70.0.0
Pygments==2.16.1

# Sphinx
sphinx==7.1.2
sphinx==7.3.7
sphinx-click==5.1.0
sphinx-copybutton==0.5.2
sphinxemoji==0.2.0
Expand All @@ -20,6 +20,7 @@ sphinx-autobuild==2024.4.16
pydata-sphinx-theme==0.14.1
autodoc_pydantic==2.2.0
appnope
sphinx-docsearch==0.0.7

pydantic!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,<3

Expand Down
6 changes: 6 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,14 @@
"sphinx_remove_toctrees",
"sphinx_design",
"sphinx.ext.intersphinx",
"sphinx_docsearch",
]

# Configuration for algolia
docsearch_app_id = "LBHF0PABBL"
docsearch_api_key = "6c42f30d9669d8e42f6fc92f44028596"
docsearch_index_name = "docs-ray"

remove_from_toctrees = [
"cluster/running-applications/job-submission/doc/*",
"ray-observability/reference/doc/*",
Expand Down
Loading