From 3b729f075b8a13597693d76eba5f2421e927a63d Mon Sep 17 00:00:00 2001 From: Antoine M Date: Thu, 19 Sep 2024 14:36:59 +0200 Subject: [PATCH] =?UTF-8?q?automatisation=20du=20d=C3=A9ploiement=20du=20t?= =?UTF-8?q?h=C3=A8me?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..6356a83 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,39 @@ +--- +kind: pipeline +type: ssh +name: Stay Safe | Back-End | Pipeline de déploiement + +clone: + disable: true + +# DATAS DU SERVEUR DE BUILD +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/lhoist-stay-safe__backend-theme.git + - name: Installation du package + commands: + - cd lhoist-stay-safe__backend-theme + - npm install + - name: Build du package + commands: + - cd lhoist-stay-safe__backend-theme + - npm run production + - name: Déploiement sur le serveur de prod + environment: + PROD_SERVER_PATH: + from_secret: prod_server_path + PROD_SERVER_PASSWORD: + from_secret: prod_server_password + PROD_SERVER_THEME_PATH: + from_secret: prod_server_theme_path + commands: + - cd lhoist-stay-safe__backend-theme + - rsync -avhpn -e 'ssh -p 22' ./ $PROD_SERVER_PATH:~/back/wp-content/themes/Deligraph_lhoist --delete