Skip to content

Commit

Permalink
Deploy docs to GitHub Pages (#1303) (#1308)
Browse files Browse the repository at this point in the history
* Deploy docs to GitHub Pages

* Fix conf.py copyrighht date

* gettext removed

(cherry picked from commit cb55369)

Co-authored-by: Arnau Casau <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
mergify[bot] and arnaucasau authored Jan 25, 2024
1 parent db73ef8 commit 402820b
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 173 deletions.
41 changes: 8 additions & 33 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,45 +43,20 @@ jobs:
pip install -e .[pyscf,mpl,sparse]
pip install -U -c constraints.txt -r requirements-dev.txt
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('["mtreinish","woodsp-ibm","mrossinek","robertodr","matteoacrossi"]', github.actor) }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v3
- 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:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install jupyter torchvision tox
sudo apt-get install -y pandoc
shell: bash
- 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
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 Nature Development Team" # pylint: disable=redefined-builtin
author = "Qiskit Nature Development Team"

docs_url_prefix = "ecosystem/nature"
docs_url_prefix = "qiskit-nature"

# The short X.Y version
version = qiskit_nature.__version__
Expand Down Expand Up @@ -159,8 +159,6 @@
("es_UN", "Spanish"),
]
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.

91 changes: 0 additions & 91 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.
16 changes: 0 additions & 16 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,3 @@ allowlist_externals =
commands =
rm -rf {toxinidir}/docs/stubs/ {toxinidir}/docs/_build

[testenv:gettext]
# Editable mode breaks macOS: https://github.com/sphinx-doc/sphinx/issues/10943
usedevelop = False
envdir = .tox/docs
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/requirements-dev.txt
pyscf; sys_platform != 'win32'
matplotlib>=3.3
sparse
opt_einsum
sphinx-intl
jupyter
commands =
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

0 comments on commit 402820b

Please sign in to comment.