Add release notes to docs build (#37) #117
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
lint: | |
name: Style and lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Prepare Python environment | |
run: pip install --upgrade pip tox | |
- name: Lint | |
run: tox -e lint | |
docs: | |
name: Build documentation | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Prepare Python environment | |
run: pip install --upgrade pip tox | |
- name: Build documentation | |
run: tox -e docs | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: qiskit-qasm3-import-docs | |
path: | | |
./docs/_build/html/* | |
!**/.doctrees | |
!**/.buildinfo | |
if-no-files-found: error | |
tests: | |
name: Run tests | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
# Just using minimum and maximum to avoid exploding the matrix. | |
python-version: ['3.8', '3.11'] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Prepare Python environment | |
run: pip install --upgrade pip tox | |
- name: Run tests | |
run: | | |
set -e | |
py=${{ matrix.python-version }} | |
tox -e py${py/./} | |
deploy-docs: | |
name: Deploy documentation | |
runs-on: ubuntu-latest | |
needs: [docs] | |
if: github.event_name == 'push' | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: qiskit-qasm3-import-docs | |
path: deploy | |
- name: Repackage for GitHub Pages | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: deploy | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |