Skip to content

v1.51.16

v1.51.16 #1425

Workflow file for this run

name: docs
on:
workflow_run:
workflows: ["ci"]
branches: [main, v1.51]
types:
- completed
release:
types: [published]
jobs:
docs:
permissions:
contents: write
runs-on: ubuntu-latest
if: ${{ github.event_name == 'release' || github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.4.0
virtualenvs-create: false
installer-parallel: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ hashFiles('**/poetry.lock') }}
- name: Install App Dependencies
run: poetry install --no-interaction --with docs
- name: Build docs (preview)
if: ${{ github.event_name != 'release' && github.ref == 'refs/heads/main'}}
run: poetry run python tools/build_docs.py docs-build --version=dev
- name: Build docs (release)
if: ${{ github.event_name == 'release' && github.event.action == 'published' }}
run: poetry run python tools/build_docs.py docs-build
- name: Fetch gh pages
run: git fetch origin gh-pages --depth=1
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs-build