mirror of
https://github.com/deepset-ai/haystack.git
synced 2026-01-06 03:57:19 +00:00
chore: bump pydoc-markdown version used in the CI (#3955)
* use latest pydoc-markdown * make the workflow manually actionable * Apply suggestions from code review Co-authored-by: Silvano Cerza <3314350+silvanocerza@users.noreply.github.com> Co-authored-by: Silvano Cerza <3314350+silvanocerza@users.noreply.github.com>
This commit is contained in:
parent
2bbe11b598
commit
7f6ed941d4
3
.github/workflows/readme_sync.yml
vendored
3
.github/workflows/readme_sync.yml
vendored
@ -1,6 +1,7 @@
|
||||
name: Sync docs with Readme
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
@ -24,7 +25,7 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install pydoc-markdown==4.5.1
|
||||
pip install pydoc-markdown==4.6.4
|
||||
|
||||
- name: Generate API docs
|
||||
run: ./.github/utils/pydoc-markdown.sh
|
||||
|
||||
@ -44,11 +44,11 @@ class ReadmeRenderer(Renderer):
|
||||
def render(self, modules: t.List[docspec.Module]) -> None:
|
||||
if self.markdown.filename is None:
|
||||
sys.stdout.write(self._frontmatter())
|
||||
self.markdown.render_to_stream(modules, sys.stdout)
|
||||
self.markdown.render_single_page(sys.stdout, modules)
|
||||
else:
|
||||
with io.open(self.markdown.filename, "w", encoding=self.markdown.encoding) as fp:
|
||||
fp.write(self._frontmatter())
|
||||
self.markdown.render_to_stream(modules, t.cast(t.TextIO, fp))
|
||||
self.markdown.render_single_page(t.cast(t.TextIO, fp), modules)
|
||||
|
||||
def _frontmatter(self) -> str:
|
||||
return README_FRONTMATTER.format(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user