---
kind: pipeline
type: exec
name: default

steps:
#- name: translate
#  commands:
#  - |
#    for inputFile in $$( ls -p src/ru/src | grep -v / )
#    do
#      python3 main.py --file src/ru/src/$${inputFile} --output src/en/src/$${inputFile}
#    done

- name: build
  commands:
  - cd src/ru
  - mdbook build
  #- cd ../../src/en
  #- mdbook build

- name: deploy
  environment:
    PASSWORD:
      from_secret: INH_CANDIDATE_0
  commands:
  - echo "$PASSWORD"
  - sshpass -p "$PASSWORD" scp -o StrictHostKeyChecking=no -r * root@selfprivacy.org:/var/www/docs.selfprivacy.org/
  