stages:
  - test
  - build
  - deploy

eslint server:
  stage: test
  rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
      changes:
        - packages/server/src/**/*
  image: node:23-alpine
  script:
    - npm i --include=dev
    - npm -w packages/server run lint

build wiki:
  stage: build
  trigger:
    include: .gitlab/ci/wiki.yml
  allow_failure: true
  rules:
    - if: $CI_PIPELINE_SOURCE != "merge_request_event" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH

deploy:
  stage: deploy
  trigger:
    include: .gitlab/ci/deploy.yml
  allow_failure: true
  rules:
    - if: $CI_PIPELINE_SOURCE != "merge_request_event" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
