Build and upload docs in CI #1
Workflow file for this run
This file contains 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: Upload documentation | ||
on: | ||
tags: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build: | ||
if: github.repository_owner == 'Qiskit' | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
name: Install Python | ||
with: | ||
python-version: "3.11" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -r ./requirements-dev.txt | ||
- name: Build documentation | ||
run: python -m sphinx -W --keep-going docs/ docs/_build | ||
- name: Store built documentation artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: qst-docs | ||
path: | | ||
./docs/_build/* | ||
!**/.doctrees | ||
!**/.buildinfo | ||
if-no-files-found: error |