Skip to content

Merge pull request #25 from lakeraai/feature/publish-docs #1

Merge pull request #25 from lakeraai/feature/publish-docs

Merge pull request #25 from lakeraai/feature/publish-docs #1

Workflow file for this run

# adapted from:
# https://til.simonwillison.net/pypi/pypi-releases-from-github
# https://github.com/snok/install-poetry
# https://jacobian.org/til/github-actions-poetry/
name: Publish Docs
on:
push:
branches:
- main
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: cache poetry install
uses: actions/cache@v2
with:
path: ~/.local
key: poetry
- uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: 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
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Publish docs
env:
LAKERA_GUARD_API_KEY: ${{ secrets.LAKERA_GUARD_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
poetry run mkdocs gh-deploy