homegrade_theme_production/.drone.yml
Antoine M 498d9f37f5
All checks were successful
continuous-integration/drone/push Build is passing
test prod
2024-09-16 11:18:07 +02:00

51 lines
1.8 KiB
YAML

---
kind: pipeline
type: ssh
name: Homegrade | Déploiment du dev
clone:
disable: true
server:
host:
from_secret: ssh_dev_host
user:
from_secret: ssh_dev_user
password:
from_secret: ssh_dev_password
steps:
- name: Clonage du Repo
commands:
- git clone https://git.deligraph.be/Antoine/homegrade_theme_production.git
- name: Installation du package
commands:
- cd homegrade_theme_production
- npm install
- name: Build du package
commands:
- cd homegrade_theme_production
- npm run production
- name: Déploiement du thème
environment:
THEME_FOLDER_NAME:
from_secret: theme_folder_name
DEV_SERVER_THEMES_PATH:
from_secret: dev_server_theme_path
DEV_SERVER_HOST:
from_secret: dev_server_host
DEV_SERVER_PORT:
from_secret: dev_server_port
PROD_SERVER_HOST:
from_secret: prod_server_host
PROD_SERVER_THEMES_PATH:
from_secret: prod_server_themes_path
commands:
- cd homegrade_theme_production
- rsync -avhp -e 'ssh -p 1982' ./ $DEV_SERVER_HOST:$DEV_SERVER_THEMES_PATH/test --delete --exclude 'node_modules' --exclude 'Makefile' --exclude 'Makefile_dev' --exclude '.env' --exclude '.env_prod' --exclude '.env_dev' --exclude '.git'
# - rsync -avhpn -e 'ssh' ./ $PROD_SERVER_HOST:~/test/ --delete --exclude 'node_modules' --exclude 'Makefile' --exclude 'Makefile_dev' --exclude '.env' --exclude '.env_prod' --exclude '.env_dev' --exclude '.git'
# - rsync -avhpn -e 'ssh' ./ $PROD_SERVER_HOST:~/homegrade/wordpress/wp-content/themes/Deligraph_Homegrade --delete --exclude 'node_modules' --exclude 'Makefile' --exclude 'Makefile_dev' --exclude '.env' --exclude '.env_prod' --exclude '.env_dev' --exclude '.git'