Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy docs to GitHub Pages (backport #739) #744

Merged
merged 2 commits into from
Jan 24, 2024
Merged
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
45 changes: 10 additions & 35 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ concurrency:

jobs:
docs_publish:
if: ${{ startsWith(github.ref, 'refs/heads/stable') && contains('["adekusar-drl","mtreinish","stefan-woerner","woodsp-ibm"]', github.actor) }}
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:
Expand All @@ -39,45 +39,20 @@ jobs:
pip install jupyter qiskit[visualization] 'torchvision<0.10.0'
sudo apt-get install -y pandoc graphviz
shell: bash
- name: Build and publish
- name: Build docs
env:
encrypted_rclone_key: ${{ secrets.encrypted_rclone_key }}
encrypted_rclone_iv: ${{ secrets.encrypted_rclone_iv }}
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
tools/deploy_documentation.sh
shell: bash
deploy-translatable-strings:
if: ${{ startsWith(github.ref, 'refs/heads/stable') && contains('["adekusar-drl","mtreinish","stefan-woerner","woodsp-ibm"]', github.actor) }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install jupyter qiskit[visualization] 'torchvision<0.10.0' tox
sudo apt-get install -y graphviz pandoc
- name: Build and publish
env:
encrypted_deploy_po_branch_key: ${{ secrets.encrypted_deploy_po_branch_key }}
encrypted_deploy_po_branch_iv: ${{ secrets.encrypted_deploy_po_branch_iv }}
QISKIT_PARALLEL: False
QISKIT_DOCS_BUILD_TUTORIALS: 'always'
run: |
echo "earliest_version: 0.1.0" >> releasenotes/config.yaml
tools/ignore_untagged_notes.sh
tools/deploy_translatable_strings.sh
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/*
6 changes: 2 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This code is part of a Qiskit project.
#
# (C) Copyright IBM 2021, 2023.
# (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
Expand Down Expand Up @@ -42,7 +42,7 @@
copyright = f"2018, {date.today().year}, Qiskit Machine Learning Development Team" # pylint: disable=redefined-builtin
author = "Qiskit Machine Learning Development Team"

docs_url_prefix = "ecosystem/machine-learning"
docs_url_prefix = "qiskit-machine-learning"

# The short X.Y version
version = qiskit_machine_learning.__version__
Expand Down Expand Up @@ -149,8 +149,6 @@
("tr_TR", "Turkish"),
]
language = "en"
locale_dirs = ["locale/"]
gettext_compact = False # optional.

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down
29 changes: 0 additions & 29 deletions tools/deploy_documentation.sh

This file was deleted.

90 changes: 0 additions & 90 deletions tools/deploy_translatable_strings.sh

This file was deleted.

Binary file removed tools/github_poBranch_update_key.enc
Binary file not shown.
Binary file removed tools/rclone.conf.enc
Binary file not shown.
14 changes: 0 additions & 14 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,3 @@ deps =
allowlist_externals = rm
commands = rm -rf {toxinidir}/docs/stubs/ {toxinidir}/docs/_build

[testenv:gettext]
envdir = .tox/docs
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/requirements-dev.txt
torch
sparse
torchvision
sphinx-intl
jupyter
commands =
pip install -e .
sphinx-build -W -T --keep-going -b gettext docs/ docs/_build/gettext {posargs}
sphinx-intl -c docs/conf.py update -p docs/_build/gettext -l en -d docs/locale