only save html files #6
This file contains hidden or 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: 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 docs artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: doc-build | |
| path: doc/build/html/ |