lhoist-stay-safe/.drone.yml
Antoine M 330a9fffd7
All checks were successful
continuous-integration/drone/push Build is passing
adding the delete flag for final complete delpoiement pipeline
2024-09-23 15:04:31 +02:00

42 lines
1.3 KiB
YAML

---
kind: pipeline
type: ssh
name: Stay Safe | Front-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.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: Génération du htAccess
commands:
- cd lhoist-stay-safe
- cp .htaccess build/.htaccess
- name: Déploiement sur le serveur de prod
environment:
PROD_SERVER_PATH:
from_secret: prod_server_path
PROD_FOLDER_PATH:
from_secret: prod_folder_path
commands:
- cd lhoist-stay-safe
- rsync -avhp -e 'ssh -p 22' ./build/ $PROD_SERVER_PATH:www --delete