image: python:3-buster

variables:
  SITE_NAME: regulacekonopi.cz
  ARTIFACTS_PATH: public
  WEBHOOK_URL: https://ha-web.pirati.cz

build:
  stage: build
  script:
    - mkdir public
    - cp -r content/* public/
  after_script:
    - echo "{\"name\":\"$SITE_NAME\" }" > request.json
    - "curl -H 'Content-Type: application/json' -X POST -d @request.json $WEBHOOK_URL"
  artifacts:
    expire_in: 30 min
    paths:
     - $ARTIFACTS_PATH

