Fixes cpp docs navbar rendering as a bulleted list #198
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: Test Documentation Build | |
| on: | |
| push: | |
| branches: [ master, pytorch_sphinx_theme2 ] | |
| pull_request: | |
| branches: [ master, pytorch_sphinx_theme2 ] | |
| workflow_dispatch: | |
| jobs: | |
| build-docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Install dependencies | |
| run: | | |
| uv pip install --system -r docs/requirements.txt | |
| uv pip install --system -e . | |
| - name: Install Node.js dependencies | |
| run: npm install | |
| - name: Build theme assets | |
| run: npx grunt default | |
| - name: Build Test documentation | |
| run: | | |
| cd docs | |
| sphinx-build -b html . _build/html | |
| - name: Upload documentation artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: documentation | |
| path: docs/_build/html/ | |
| # Doc previews are handled automatically by Netlify | |
| # See netlify.toml for configuration | |
| doc-preview: | |
| runs-on: linux.2xlarge | |
| needs: build-docs | |
| if: ${{ github.event_name == 'pull_request' }} | |
| steps: | |
| - name: Download artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: documentation | |
| path: docs/_build/html | |
| - name: Upload docs preview | |
| uses: seemethere/upload-artifact-s3@v5 | |
| with: | |
| retention-days: 14 | |
| s3-bucket: doc-previews | |
| if-no-files-found: error | |
| path: docs/_build/html | |
| s3-prefix: pytorch_sphinx_theme/${{ github.event.pull_request.number }} |