stages:
  - deploy

deploy-pages:
  stage: deploy
  image: node:22
  rules:
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
      changes:
        - web/**/*
        - .gitlab-ci.yml
  script:
    - cd web
    - npm ci
    - npm run build -- --base="${CI_PAGES_URL}/"
    - mv dist ../public
  pages:
    publish: public
