update:
  only:
    - tags
    - triggers
  before_script:
    # Abhängigkeiten überprüfen
    - which composer
    - which git
  script:
    # Pfad zum neu geklonten Repo
    - path=`pwd`
    - cd ~/
    - if [ -d MetaGer_neu ]; then rm -rf MetaGer_neu;fi
    - git clone "$path" MetaGer_neu
    - cd MetaGer_neu
    - composer update
    - chmod -R 777 storage
    - chmod -R 777 bootstrap/cache
    - scp metager@metager3.de:~/.env .
    - scp metager@metager3.de:~/sumas.xml config/
    - scp metager@metager3.de:~/sumasEn.xml config/
    - cd ~/
    - rm -rf MetaGer
    - mv MetaGer_neu MetaGer