Skip to content

Commit 68c3a89

Browse files
authored
Put search step back into project build task (#4655)
It got removed a bit early and if we don't set an outcome, search files aren't synced correctly. Refs #4638
1 parent 36dea4f commit 68c3a89

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

readthedocs/projects/tasks.py

+9
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,7 @@ def build_docs(self):
692692
version=self.version,
693693
max_lock_age=getattr(settings, 'REPO_LOCK_SECONDS', 30)):
694694
outcomes['html'] = self.build_docs_html()
695+
outcomes['search'] = self.build_docs_search()
695696
outcomes['localmedia'] = self.build_docs_localmedia()
696697
outcomes['pdf'] = self.build_docs_pdf()
697698
outcomes['epub'] = self.build_docs_epub()
@@ -723,6 +724,14 @@ def build_docs_html(self):
723724

724725
return success
725726

727+
def build_docs_search(self):
728+
"""Build search data."""
729+
# TODO rely on config parameter here when Project.documentation_type is
730+
# removed in #4638. Mkdocs has no search currently
731+
if self.project.documentation_type == 'mkdocs':
732+
return False
733+
return self.build_search
734+
726735
def build_docs_localmedia(self):
727736
"""Get local media files with separate build."""
728737
if 'htmlzip' not in self.config.formats:

0 commit comments

Comments
 (0)