stages:
  - build
  - deploy


docs-build:
  stage: build
  image: python:latest
  script:
    - pip install -U jupyter-book
    - jupyter-book clean docs
    - jupyter-book build docs
    - ls 
  artifacts:
    paths:
      - docs/_build/

pages:
  stage: deploy
  image: busybox:latest
  needs: [docs-build]
  script:
    - ls
    - mv docs/_build/html public
  artifacts:
    paths:
      - public
  rules:
    - if: $CI_COMMIT_BRANCH == "main"