Skip to content

Commit

Permalink
chore: sync integrations docs with all the available Haystack versions (
Browse files Browse the repository at this point in the history
deepset-ai#713)

* sync docs with all the versions

* automatically fetch versions

* Update CI_readme_sync.yml

Co-authored-by: Silvano Cerza <[email protected]>

---------

Co-authored-by: Silvano Cerza <[email protected]>
  • Loading branch information
masci and silvanocerza committed May 3, 2024
1 parent 5c7e1b7 commit 1d0a556
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/CI_readme_sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,26 @@ env:
TAG: ${{ inputs.tag || github.ref_name }}

jobs:
get-versions:
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.version_finder.outputs.versions }}
steps:
- name: Get Haystack Docs versions
id: version_finder
run: |
curl https://dash.readme.com/api/v1/version --header 'authorization: Basic ${{ secrets.README_API_KEY }}' > out
VERSIONS=$(jq '[ .[] | select(.version | startswith("2."))| .version ]' out)
echo "versions=$VERSIONS" >> "$GITHUB_OUTPUT"
sync:
runs-on: ubuntu-latest
needs: get-versions
strategy:
fail-fast: false
max-parallel: 1
matrix:
hs-docs-version: ${{ fromJSON(needs.get-versions.outputs.versions) }}
steps:
- name: Checkout this repo
uses: actions/checkout@v4
Expand All @@ -39,7 +57,7 @@ jobs:
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)
print(f'project_path={project_path}', file=f)
- name: Generate docs
working-directory: ${{ steps.pathfinder.outputs.project_path }}
Expand All @@ -54,7 +72,7 @@ jobs:
find . -name "_readme_*.md" -exec cp "{}" tmp \;
ls tmp
- name: Sync API docs
- name: Sync API docs with Haystack docs version ${{ matrix.hs-docs-version }}
uses: readmeio/rdme@v8
with:
rdme: docs ${{ steps.pathfinder.outputs.project_path }}/tmp --key=${{ secrets.README_API_KEY }} --version=2.0
rdme: docs ${{ steps.pathfinder.outputs.project_path }}/tmp --key=${{ secrets.README_API_KEY }} --version=${{ matrix.hs-docs-version }}

0 comments on commit 1d0a556

Please sign in to comment.