kind: pipeline
name: default

trigger:
  branch:
  - main

steps:
- name: ssh
  image: appleboy/drone-ssh
  settings:
    host:
      - debian01.skunklab.ch
    username: rulrich
    password:
      from_secret: drone_ssh_password
    port: 22
    command_timeout: 2m
    script:
      - cd /etc/opt/docker/pcs-website/build/lektor
      - git pull
      - cd /etc/opt/docker/pcs-website/build
      - docker run -it \
        -v /etc/opt/docker/pcs-website/lektor/lektordata/project:/opt/lektor/project \
        -v /etc/opt/docker/pcs-website/static:/opt/lektor/build \
        lektor lektor build -O /opt/lektor/build
  when:
    event:
    - push
    - tag
    branch:
    - main