---
kind: pipeline
type: ssh
name: Majdouline Sbai | Déploiment du Thème

clone:
        disable: true

server:
        host:
                from_secret: build_server_host
        user:
                from_secret: build_server_user
        password:
                from_secret: build_server_password

steps:
        - name: Clonage du Repo
          commands:
                  - git clone https://git.deligraph.be/Antoine/majdouline-sbai.git
        - name: Installation du package
          commands:
                  - cd majdouline-sbai
                  - npm install
        - name: Build du package
          commands:
                  - cd majdouline-sbai
                  - npm run production
        - name: Déploiement sur le serveur de dev
          environment:
                  DEV_SERVER_PATH:
                          from_secret: dev_server_host
          commands:
                  - cd majdouline-sbai
                  - rsync -avhp -e 'ssh -p 1982' ./ ~/ms/user/theme/test --delete --exclude 'node_modules' --exclude 'Makefile' --exclude '.git' --exclude '.env' --exclude '.env_prod' --exclude '.env_dev'
