haystack/.github/workflows/documentation.yml
Sara Zan e92ea4fccb
refactor: rename master into main in documentation and links (#3063)
* master->main

* revert master rename

* Revert change to sphinx link and rename master schema
2022-08-24 19:05:12 +02:00

50 lines
1.6 KiB
YAML

name: Documentation
on:
workflow_dispatch: # Activate this workflow manually
pull_request:
jobs:
api-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: ./.github/actions/python_cache/
- name: Install Haystack
run: |
pip install --upgrade pip
pip install -U .[dev]
- name: Update API documentation
run: .github/utils/pydoc-markdown.sh
- name: Check status
run: |
if [[ `git status --porcelain` ]]; then
git status
echo "###################################################################################################"
echo "# "
echo "# CHECK FAILED! The API docs were not updated."
echo "# "
echo "# Either:"
echo "# 1. Generate the new API docs locally before committing:"
echo "# "
echo "# .github/utils/pydoc-markdown.sh"
echo "# "
echo "# 2. Install the pre-commit hook:"
echo "# "
echo "# pre-commit install --hook-type pre-push"
echo "# "
echo "# 3. See https://github.com/deepset-ai/haystack/blob/main/CONTRIBUTING.md for help."
echo "# "
echo "# If you have further problems, please open an issue: https://github.com/deepset-ai/haystack/issues"
echo "# "
echo "###################################################################################################"
exit 1
fi