Skip to content

Add back the old banner and add a condition to load on docs.pytorch.org #8

Add back the old banner and add a condition to load on docs.pytorch.org

Add back the old banner and add a condition to load on docs.pytorch.org #8

Workflow file for this run

name: Test Documentation Build

Check failure on line 1 in .github/workflows/build-theme.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build-theme.yml

Invalid workflow file

(Line: 65, Col: 22): The expression is not closed. An unescaped ${{ sequence was found, but the closing }} sequence was not found.
on:
push:
branches: [ main ]
pull_request:
branches: [ main, 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: '16'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
pip install -e .
- 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@v3
with:
name: documentation
path: docs/_build/html/
doc-preview:
runs-on: ubuntu-latest
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 }