From 573f241360d4452364d4fac8e4efe4d43edc5a82 Mon Sep 17 00:00:00 2001 From: Antoine M Date: Mon, 22 Jul 2024 11:17:28 +0200 Subject: [PATCH] updating env and makefile --- .env | 4 ++++ Makefile | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 .env create mode 100644 Makefile diff --git a/.env b/.env new file mode 100644 index 0000000..fdb909c --- /dev/null +++ b/.env @@ -0,0 +1,4 @@ +# export THEME_FOLDER_NAME=Deligraph_Homegrade +export HOST=deliadmin@51.91.77.19 +export PORT=1982 +export CONTENT_PATH=~/oxfam/wordpress/ diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..59c996c --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +########################## +# SCRIPT DE DÉPLOIEMENT +########################## + +include .env + +RED=\033[0;31m +GREEN=\033[0;32m +YELLOW=\033[0;33m +NC=\033[0m # No Color + +deploy: deploy-dist + +deploy-dist: + @echo "$(GREEN)####Synchronisation des Themes $(NC)" + @rsync -avhp -e 'ssh -p $(PORT)' ./dist/ $(HOST):$(CONTENT_PATH) --delete --exclude 'node_modules' --exclude 'Makefile' --exclude 'Makefile_dev' --exclude '.env' --exclude '.env_prod' --exclude '.env_dev' --exclude '.git' + +test-connect: + @echo "$(GREEN)####SIMULATION — TEST DE CONNEXION $(NC)" + @ssh -p $(PORT) $(HOST) "cd $(CONTENT_PATH); pwd" +