mirror of
https://github.com/deepset-ai/haystack.git
synced 2026-01-08 13:06:29 +00:00
* Adding simple setup.py to ui/ and rest_api and remove respective extras from main setup.cfg * Make 'pip install rest_api/' fetch the local Haystack instead of downloading from pypi * Add some comments to the new setup.py files and fix the Dockerfiles * Add version info to 'farm-haystack-ui' * Fix the OpenAPI Specs workflow * Install rest_api and ui properly on the CI too * Make the workflow see changes on every setup file * Fix workflow cache keys * Add license to rest_api and ui
48 lines
1.4 KiB
YAML
48 lines
1.4 KiB
YAML
name: Generate OpenAPI Specs
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
paths:
|
|
- "rest_api/**"
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
|
|
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
|
|
|
|
- name: Set up Python 3.8.10
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.8.10
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
python -m pip install rest_api/
|
|
|
|
# Generates the docstrings and tutorials so that we have the latest for the deployment
|
|
- name: Generate Docstrings and Tutorials
|
|
run: |
|
|
cd docs/_src/api/openapi/
|
|
python generate_openapi_specs.py
|
|
cd ../../../../
|
|
git status
|
|
|
|
- name: Commit files
|
|
run: |
|
|
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
git config --local user.name "github-actions[bot]"
|
|
git add .
|
|
git commit -m "Update OpenAPI Specs" -a || echo "No changes to commit"
|
|
- name: Push changes
|
|
uses: ad-m/github-push-action@master
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
branch: ${{ github.ref }}
|