Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Build Sphinx docs

on:
workflow_dispatch:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+*"
branches:
- main
- 'stable/**'
pull_request:
branches:
- main
- 'stable/**'
jobs:
build:
name: Build docs
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v7
with:
# reno reads the tags and their history to assemble the release notes, and
# setup.py needs the vendored upstream headers to compile the extension.
fetch-depth: 0
submodules: recursive
- uses: actions/setup-python@v7
with:
python-version: '3.10'
- name: Install dependencies
# autodoc imports the package, so the extension has to compile here -- hence the
# same MPI and BLAS packages the test workflow installs, rather than the lighter
# set a pure-Python docs build would need.
run: |
python -m pip install --upgrade pip
pip install tox
sudo apt-get update
sudo apt-get install -y libopenmpi-dev openmpi-bin libopenblas-dev
- name: Build docs
shell: bash
# CPU only: the runner has no GPU toolchain, and the API reference does not
# depend on which backends were compiled.
env:
SBD_BUILD_BACKEND: cpu
run: |
tox -edocs
- name: Upload docs artifact
# Uploaded even on failure, which pairs with sphinx-build's --keep-going: the
# partial HTML is usually the fastest way to see what went wrong.
if: always()
uses: actions/upload-pages-artifact@v5
with:
path: docs/_build/html

deploy:
name: Deploy docs
if: ${{ github.ref == 'refs/heads/main' }}
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ build/
dist/
*.egg-info/

# Sphinx documentation
docs/_build/
docs/stubs/

# editor / OS noise
.DS_Store
*.swp
Expand Down
Empty file added docs/_static/.gitkeep
Empty file.
178 changes: 178 additions & 0 deletions docs/_static/images/qiskit-dark-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading