Commit 92b22a96 authored by Kourser's avatar Kourser
Browse files

ci: build docs in a venv for the shell runner



The GitLab runner uses the shell executor, so `image:` is ignored and there is
no global `pip`. Build the MkDocs site inside a python3 virtualenv instead
(pinned mkdocs/mkdocs-material). Drop the macOS-tagged Swift job (no mac runner).

Co-Authored-By: default avatarClaude <claude@anthropic.com>
parent ae0d4f0d
Loading
Loading
Loading
Loading
Loading
+10 −18
Original line number Diff line number Diff line
# Runner: shell executor (amd64/linux). `image:` is ignored by shell runners,
# so the job builds the docs in a local Python virtualenv.
#
# Runner host prerequisites (one-time): `python3` + the venv module
# (Debian/Ubuntu: `apt install python3-venv`), and network access to PyPI.

stages:
  - test
  - deploy

# --- Documentation site → GitLab Pages -------------------------------------
# Builds the MkDocs Material site from docs/ into ./public, which GitLab Pages
# serves. Runs on a Linux runner; no macOS needed.
pages:
  stage: deploy
  image: python:3.12.7-slim
  script:
    - pip install --no-cache-dir mkdocs==1.6.1 mkdocs-material==9.6.9
    - python3 -m venv .venv
    - . .venv/bin/activate
    - python -m pip install --upgrade pip
    - python -m pip install mkdocs==1.6.1 mkdocs-material==9.6.9
    - mkdocs build --site-dir public
  artifacts:
    paths:
      - public
  rules:
    - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'

# --- Swift package tests ----------------------------------------------------
# Requires a macOS runner with the Swift toolchain (tag `macos`). Left manual so
# the pipeline isn't blocked when no macOS runner is registered.
core-tests:
  stage: test
  tags:
    - macos
  when: manual
  allow_failure: true
  script:
    - swift test --package-path Packages/Core