Add custom default Retriever/TextSplitter, update deprecated OpenAI model #40
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: docs | |
on: | |
pull_request_target: | |
types: [closed] | |
workflow_dispatch: | |
env: | |
PYTHON_VERSION: 3.11 | |
permissions: | |
contents: write | |
id-token: write | |
pages: write | |
jobs: | |
documentation: | |
name: Build documentation | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python runtime | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Install and configure Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: latest | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies, including dev dependencies | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction --with dev | |
- name: Install mkdocs-material | |
run: poetry add mkdocs-material | |
- name: Build documentation | |
# `TZ=UTC` added as a workoround to make it work with `act`, see https://github.com/nektos/act/issues/1853#issuecomment-1620853901 | |
run: | | |
TZ=UTC .venv/bin/mkdocs build --clean | |
.venv/bin/mkdocs --version | |
- name: Create OpenAPI Json file | |
run: .venv/bin/create_openapi | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
- name: Build Redoc instance | |
run: npx @redocly/cli build-docs ./openapi.json --output=site/redoc/index.html | |
- name: Adjust permissions | |
run: | | |
chmod -c -R +rX site/ | while read line; do | |
echo "::warning title=Invalid file permissions automatically fixed::$line" | |
done | |
- name: Upload to GitHub Pages | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: site | |
- name: Deploy to GitHub Pages | |
uses: actions/deploy-pages@v4 | |
- name: Save build cache | |
uses: actions/cache/save@v3 | |
with: | |
key: brevia-docs-${{ hashfiles('.cache/**') }} | |
path: .cache |