haystack/.github/workflows/readme_sync.yml
Stefano Fiorucci 3cc8e54f41
ci: update "Sync docs with Readme" (#7029)
* try to update workflow

* try sync

* revert experimental commits
2024-02-18 14:42:45 +01:00

43 lines
1.1 KiB
YAML

name: Sync docs with Readme
on:
pull_request:
paths:
- "docs/pydoc/**"
push:
branches:
- main
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
- name: Generate API docs
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: ./.github/utils/pydoc-markdown.sh
- name: Sync docs with 2.0
# Sync the docs to the `2.0` version on Readme
id: sync-main
if: github.ref_name == 'main' && github.event_name == 'push'
uses: readmeio/rdme@v8
with:
rdme: docs ./docs/pydoc/temp --key=${{ secrets.README_API_KEY }} --version=v2.0