---
stages:
  - build
  - deploy

build:
  stage: build
  script:
    - apt-get -y update
    - apt-get -y install zip python3-minimal
    - bash scripts/build.sh
  artifacts:
    paths:
      - ./build/safelinks-cleaner-thunderbird.xpi
      - ./build/safelinks-cleaner-firefox.xpi

pages:
  stage: deploy
  script:
    - cp -r site .public
    - cp build/safelinks-cleaner-thunderbird.xpi .public
    - cp build/safelinks-cleaner-firefox.xpi .public
    - mv .public public
    - ls -lr public
  artifacts:
    paths:
      - public/
  only:
    - beta
  when: always
