Deploy Docs #1
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
# This code is part of a Qiskit project. | |
# | |
# (C) Copyright IBM 2021, 2024. | |
# | |
# This code is licensed under the Apache License, Version 2.0. You may | |
# obtain a copy of this license in the LICENSE.txt file in the root directory | |
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. | |
# | |
# Any modifications or derivative works of this code must retain this | |
# copyright notice, and modified files need to carry a notice indicating | |
# that they have been altered from the originals. | |
name: Deploy Docs | |
on: | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.repository }}-${{ github.ref }}-${{ github.head_ref }}-${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
docs_publish: | |
if: ${{ startsWith(github.ref, 'refs/heads/stable') && contains('["adekusar-drl","mtreinish","woodsp-ibm","smens","edoaltamura","oscar-wallis","OkuyanBoga","Benjamin-Symons"]', github.actor) }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.9] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: ./.github/actions/install-machine-learning | |
- name: Install Dependencies | |
run: | | |
pip install jupyter qiskit[visualization] 'torchvision<0.10.0' | |
sudo apt-get install -y pandoc graphviz | |
shell: bash | |
- name: Build docs | |
env: | |
QISKIT_PARALLEL: False | |
QISKIT_DOCS_BUILD_TUTORIALS: 'always' | |
run: | | |
echo "earliest_version: 0.1.0" >> releasenotes/config.yaml | |
tools/ignore_untagged_notes.sh | |
make html | |
shell: bash | |
- name: Bypass Jekyll Processing # Necessary for setting the correct css path | |
run: touch docs/_build/html/.nojekyll | |
- name: Deploy | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: docs/_build/html/ | |
clean-exclude: | | |
locale/* |