Skip to content

Deploy Docs

Deploy Docs #2

Workflow file for this run

# This code is part of a Qiskit project.
#
# (C) Copyright IBM 2022, 2023.
#
# 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_build:
if: ${{ contains('["eggerdj", "ElePT"]', github.actor) }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: |
requirements.txt
requirements-dev.txt
- name: Install Deps
run: |
python -m pip install -U tox setuptools virtualenv wheel
sudo apt-get install -y pandoc graphviz
- name: Install and Run Docs
run: tox -e docs
- name: Run upload documentation artifacts
uses: actions/upload-artifact@v3
with:
name: page
path: docs/_build/html
deploy:
runs-on: ubuntu-latest
needs: docs_build
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}
steps:
- uses: actions/download-artifact@v3
with:
name: page
path: .
- uses: actions/configure-pages@v1
- uses: actions/upload-pages-artifact@v1
with:
path: .
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1