Skip to content

Google Generators: change answers to replies (#626) #198

Google Generators: change answers to replies (#626)

Google Generators: change answers to replies (#626) #198

Workflow file for this run

name: Core / Sync docs with Readme
on:
push:
tags:
- "**-v[0-9].[0-9]+.[0-9]+"
workflow_dispatch: # Activate this workflow manually
inputs:
tag:
description: "Tag with this format: integrations/<INTEGRATION_FOLDER_NAME>-v1.0.0"
required: true
type: string
default: integrations/<INTEGRATION_FOLDER_NAME>-v1.0.0
env:
TAG: ${{ inputs.tag || github.ref_name }}
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout this repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U haystack-pydoc-tools hatch
- name: Get project folder
id: pathfinder
shell: python
run: |
import os
project_path = os.environ["TAG"].rsplit("-", maxsplit=1)[0]
with open(os.environ['GITHUB_OUTPUT'], 'a') as f:
print(f'project_path={project_path}', file=f)
- name: Generate docs
working-directory: ${{ steps.pathfinder.outputs.project_path }}
env:
# This is necessary to fetch the documentation categories
# from Readme.io as we need them to associate the slug
# in config files with their id.
README_API_KEY: ${{ secrets.README_API_KEY }}
run: |
hatch run docs
mkdir tmp
find . -name "_readme_*.md" -exec cp "{}" tmp \;
ls tmp
- name: Sync API docs
uses: readmeio/rdme@v8
with:
rdme: docs ${{ steps.pathfinder.outputs.project_path }}/tmp --key=${{ secrets.README_API_KEY }} --version=2.0