message: GitHub Pages CI Job updates
diff: @@ -28,6 +28,12 @@ jobs:
  parameters:
  cmake_args: ""
  + # Only the main branch builds and publishes the versioned documentation.
  + # This is because the configuration of the docs (e.g. theme) will change
  + # over time and only the main branch should be source of truth and be
  + # kept up to date.
  +
  + # Only on main and not on PRs
  - script: |
  set -ex
  python3.8 -m venv env
  @@ -37,7 +43,28 @@ jobs:
  pip install -U -e ./python
  pip install -U -r doc/historical_ccf_requirements.txt
  sphinx-multiversion doc build/html
  - displayName: Sphinx
  + displayName: Sphinx Multi-version
  + condition: |
  + and(
  + not(eq(variables['Build.Reason'], 'PullRequest')),
  + eq(variables['Build.SourceBranch'], 'refs/heads/main')
  + )
  +
  + # Only on PRs and not on main (e.g. release branch/tag)
  + - script: |
  + set -ex
  + python3.8 -m venv env
  + source env/bin/activate
  + pip install wheel
  + pip install -U -r doc/requirements.txt
  + pip install -U -e ./python
  + sphinx-build doc build/html
  + displayName: Sphinx Single-version
  + condition: |
  + or(
  + eq(variables['Build.Reason'], 'PullRequest'),
  + not(eq(variables['Build.SourceBranch'], 'refs/heads/main'))
  + )
  - script: |
  set -ex
  @@ -71,10 +98,7 @@ jobs:
  condition: |
  and(
  not(eq(variables['Build.Reason'], 'PullRequest')),
  - or(
  - eq(variables['Build.SourceBranch'], 'refs/heads/main'),
  - startsWith(variables['Build.SourceBranch'], 'refs/tags/ccf-')
  - )
  + eq(variables['Build.SourceBranch'], 'refs/heads/main')
  )
  workingDirectory: build/html
  