Skip to content

Update config.yml

Update config.yml #9

Workflow file for this run

name: Build Documentation
on:
push:
branches:
- migrate-to-gh-actions
pull_request:
branches:
- migrate-to-gh-actions
jobs:
build-doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
python-version: "3.9"
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install rename
- name: Install doc dependencies
run: |
cd doc
uv venv
uv pip install -r requirements.txt
- name: Install plotly in editable mode
if: github.ref_name != 'doc-prod'
run: |
cd doc
uv pip install -e ..
- name: List installed packages
run: |
cd doc
uv pip list
- name: Build HTML docs
env:
MAPBOX_TOKEN: ${{ secrets.MAPBOX_TOKEN }}
run: |
cd doc
source .venv/bin/activate
echo "${MAPBOX_TOKEN}" > python/.mapbox_token
make -kj8 || make -kj8
curl https://raw.githubusercontent.com/plotly/graphing-library-docs/master/front-matter-ci.py > front-matter-ci.py
curl https://raw.githubusercontent.com/plotly/graphing-library-docs/master/check-or-enforce-order.py > check-or-enforce-order.py
python front-matter-ci.py build/html
python check-or-enforce-order.py build/html
- name: Upload HTML docs artifact
uses: actions/upload-artifact@v4
with:
name: doc-html
path: doc/build/html/
- name: Build API docs
run: |
cd doc
source .venv/bin/activate
# For the API doc, we need to use the local version of plotly
# since we are tweaking the source because of
# graph_objs/graph_objects
uv pip uninstall plotly
uv pip install -e ..
cd apidoc
make html
- name: Upload API docs artifact
uses: actions/upload-artifact@v4
with:
name: apidoc-build
path: doc/apidoc/_build/html/