Skip to content

Commit

Permalink
Disable the 'force-orphan' option in the doc deployment (#225)
Browse files Browse the repository at this point in the history
* Disable the 'force-orphan' option in the doc deployment

Disable the 'force-orphan' option when deploying the documentation,
which causes the 'gh-pages' branch to be recreated from scratch.
This is incompatible with the linear history requirement in our
branch protection rules.

* Add pydata-sphinx-theme install workaround
  • Loading branch information
greschd authored Mar 21, 2023
1 parent 7938b9b commit 1b014a1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,13 @@ jobs:
python-version: ${{ env.MAIN_PYTHON_VERSION }}

- name: "Install Python dependencies"
# TODO: remove 'poetry config installer.modern-installation false' once we use a pydata-sphinx-theme
# version where https://github.com/pydata/pydata-sphinx-theme/issues/1253 is resolved.
# The same needs to be removed in the README.
run: |
python -m pip install --upgrade pip tox
python -m pip install --upgrade poetry
poetry config installer.modern-installation false
- name: "Generate the documentation with tox"
run: |
Expand Down Expand Up @@ -205,6 +209,7 @@ jobs:
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
force-orphan: false

release:
name: "Release project"
Expand Down Expand Up @@ -235,3 +240,4 @@ jobs:
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
force-orphan: false
5 changes: 5 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,13 @@ familiar with the `PyAnsys Developer's Guide`_.

.. code:: bash
poetry config installer.modern-installation false
poetry install --all-extras
Setting ``installer.modern-installation`` to ``false`` is a temporary workaround.
See `this pydata-sphinx-theme issue <https://github.com/pydata/pydata-sphinx-theme/issues/1253>`_
for more information.


#. Activate the virtual environment:

Expand Down

0 comments on commit 1b014a1

Please sign in to comment.