From 184940b15ed5b38eece5ddf1d3d16b63082fe935 Mon Sep 17 00:00:00 2001
From: Jean-Baptiste <bleme@pm.me>
Date: Thu, 18 Apr 2019 10:01:35 +0200
Subject: [PATCH] update: add alpha server to makefile

---
 Makefile | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 4f4a825c..58922bca 100644
--- a/Makefile
+++ b/Makefile
@@ -52,10 +52,17 @@ $(DIST_DIR)/index.html: src/index.pug src/config.json $(wildcard src/*.pug src/*
 # pug (prod)
 $(DIST_DIR)/index.prod.html: src/index.pug src/config.json $(wildcard src/*.pug src/*/*.pug)
 	@echo pug: $< ➜ $@
-	
+
 	@export ENV="prod"; \
 	node_modules/.bin/pug --pretty $< --out $(dir $@) -E prod.html -O src/config.json || touch $@
 
+# pug (staging)
+$(DIST_DIR)/index.staging.html: src/index.pug src/config.json $(wildcard src/*.pug src/*/*.pug)
+	@echo pug: $< ➜ $@
+
+	@export ENV="staging"; \
+	node_modules/.bin/pug --pretty $< --out $(dir $@) -E staging.html -O src/config.json || touch $@
+
 # sass
 $(DIST_DIR)/styles/index.css: src/styles/index.scss $(wildcard src/*.scss src/*/*.scss)
 	@echo sass: $< ➜ $@
@@ -75,9 +82,14 @@ deploy: pull install build
 pull:
 	git pull
 
-sync: buildprod
-	rsync -rv www/* staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/ --exclude=www/index.html --exclude=www/index.prod.html
-	rsync --no-R --no-implied-dirs www/index.prod.html staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/index.html
+sync: buildstaging
+	rsync -rv www/* staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/ --exclude=www/index.html --exclude=www/index.prod.html --exclude=www/index.staging.html
+	rsync --no-R --no-implied-dirs www/index.staging.html staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/index.html
 	rsync -v www/.htaccess staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/
 
+sync-prod: buildprod
+	rsync -rv www/* alpha@ssh-alpha.happy-dev.fr:~/alpha.happy-dev.fr/ --exclude=www/index.html --exclude=www/index.prod.html --exclude=www/index.staging.html
+	rsync --no-R --no-implied-dirs www/index.prod.html alpha@ssh-alpha.happy-dev.fr:~/www/index.html
+	rsync -v www/.htaccess alpha@ssh-alpha.happy-dev.fr:~/www/
+
 .PHONY: default install submodules copy_lib copy_samples build watch serve clean sync buildprod pull deploy
\ No newline at end of file
-- 
GitLab