diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index d9361ee384a1..ce201ef3f1ad 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -55,21 +55,23 @@ jobs: echo "SPHINX_OPTS=-W -v --keep-going -j 2" >> $GITHUB_ENV if: ${{ fromJSON(env.SPHINX_WARNINGS_AS_ERROR) }} - name: install pandoc linux - # add the || true logic to not error in case the index cannot be fetched. - # this is known to have happened before e.g. - # https://github.com/microsoft/linux-package-repositories/issues/130 run: | - sudo apt update || true - sudo apt install pandoc + sudo apt-get -o Acquire::Retries=4 -o APT::Update::Error-Mode=any update + sudo apt-get -o Acquire::Retries=4 install --yes pandoc if: runner.os == 'Linux' - name: Install pandoc on windows - uses: Wandalen/wretry.action@e68c23e6309f2871ca8ae4763e7629b9c258e1ea # v3.8.0 - with: - action: crazy-max/ghaction-chocolatey@v1.6.0 - with: | - args: install pandoc - attempt_limit: 5 - attempt_delay: 1000 + shell: pwsh + run: | + for ($attempt = 1; $attempt -le 5; $attempt++) { + choco install pandoc --yes --no-progress + if ($LASTEXITCODE -in 0, 1641, 3010) { + exit 0 + } + if ($attempt -eq 5) { + throw "Pandoc installation failed after 5 attempts (exit code $LASTEXITCODE)." + } + Start-Sleep -Seconds 1 + } if: runner.os == 'Windows' # h5py does not ship wheels for Python 3.15 yet so it is built from source, # which requires the HDF5 headers. Remove once h5py ships cp315 wheels.