From 2a5489488593cb34311ecd42d9a8d6179e9be61c Mon Sep 17 00:00:00 2001 From: Antoine M Date: Thu, 12 Sep 2024 15:38:59 +0200 Subject: [PATCH] setting up the drone file --- .drone.yml | 39 +++++++++++++++++++++++++++++++++++++++ .gitignore | 1 - 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..6acc75a --- /dev/null +++ b/.drone.yml @@ -0,0 +1,39 @@ +--- +kind: pipeline +type: ssh +name: Stay Safe | 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.git + - name: Installation du package + commands: + - cd lhoist-stay-safe + - npm install + - name: Build du package + commands: + - cd lhoist-stay-safe + - npm run build + - 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_FOLDER_PATH: + from_secret: prod_folder_path + commands: + - cd lhoist-stay-safe + - sshpass -p "$PROD_SERVER_PASSWORD" rsync -avhp -e 'ssh -p 22' ./build/ $PROD_SERVER_PATH:$PROD_FOLDER_PATH --delete \ No newline at end of file diff --git a/.gitignore b/.gitignore index cdaeb76..9d850e9 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,3 @@ npm-debug.log* yarn-debug.log* yarn-error.log* -.drone.yml \ No newline at end of file