pages:
  image: node:22
  stage: deploy
  rules:
    - if: '$CI_COMMIT_REF_NAME == "v4"'
  before_script:
    - git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/".insteadOf "git@gitlab.com:"
    - git clone --depth 1 git@gitlab.com:Anson-Projects/brain.git content
    - hash -r
    - npm ci --cache .npm --prefer-offline
  script:
    - npx quartz build
    - echo "Deploying to GitLab Pages..."
  artifacts:
    paths:
      - public