variables:
  RELEASE_DIR: "public/p2repo"

pages:
  stage: deploy
  tags: 
    - docker # use shared runner
  image: maven:3.8.4-eclipse-temurin-17-alpine
  script:
    - mvn --version
    - mvn clean install   # build p2 repo
    - rm -rf public
    - mkdir -p $RELEASE_DIR
    - cp -r de.hftstuttgart.cityunits.p2site/target/repository/* $RELEASE_DIR
  artifacts:
    paths:
      - public
  only:
  - master
