can either link to redoc hosted elsewhere or make a local copy: - for local frontend build, just redirect to http://localhost:30870/api/redoc - for deployment, make local copy: run copy-api-docs.sh, copy locally from prod and serve at /api/ - copy-api-docs.sh copies openapi.json, redoc and logo to /api/ dir - if analytics enabled, also injects analytics scripts - for local testing, run copy-api-docs.sh and then run mkdocs serve - ci: copy from prod server - fixes #1582
34 lines
786 B
YAML
34 lines
786 B
YAML
name: Publish Docs
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
release:
|
|
types: [published]
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
deploy_docs:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: 3.x
|
|
- run: pip install mkdocs-material requests pyyaml
|
|
|
|
- name: Generate Helm Chart Index
|
|
run: python ./scripts/generate-helm-index.py > ./frontend/docs/docs/helm-repo/index.yaml
|
|
|
|
- name: Copy Docs Files
|
|
run: frontend/docs/copy-api-docs.sh
|
|
env:
|
|
DOCS_SOURCE_URL: https://app.browsertrix.com
|
|
ENABLE_ANALYTICS: true
|
|
|
|
- name: Build Docs
|
|
run: cd frontend/docs; mkdocs gh-deploy --force
|
|
env:
|
|
ENABLE_ANALYTICS: true
|