File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 4545 run : ssh-keyscan "static.europython.eu" > ~/.ssh/known_hosts
4646
4747 - name : Deploy to server
48- run : make deploy
48+ run : make deploy FORCE_DEPLOY=true
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ export GIT_VERSION ?= $(shell git rev-parse --short HEAD)
1818BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
1919# Replace "/" and other non-alphanumeric characters with "-"
2020SAFE_BRANCH := $(shell echo "$(BRANCH ) " | sed 's/[^A-Za-z0-9._-]/-/g')
21+ FORCE_DEPLOY ?= false
2122
2223# TODO: update this to the prod branches
2324ifeq ($(SAFE_BRANCH ) , deployment-simpler)
@@ -48,9 +49,11 @@ build:
4849 # NOTE: also let's find a better way to do this :D
4950 find ./dist/_astro/ -iname ' *.jpg' -delete
5051
52+ ifeq ($(FORCE_DEPLOY ) , true)
5153deploy :
52- @echo " \n\n**** Deploying branch '$( BRANCH) ' (safe: $( SAFE_BRANCH) ) to $( TARGET) ...\n\n"
53- $(REMOTE_CMD ) " mkdir -p $( TARGET) "
54- rsync -avz --delete ./dist/ $(VPS_USER ) @$(VPS_HOST ) :$(TARGET ) /
55- $(REMOTE_CMD ) " cd $( RELEASES_DIR) && ln -snf $( TIMESTAMP) current"
56- @echo " \n\n**** Deployment complete.\n\n"
54+ @echo " \n\n**** Deploying branch '$( BRANCH) ' (safe: $( SAFE_BRANCH) ) to $( TARGET) ...\n\n"
55+ $(REMOTE_CMD ) " mkdir -p $( TARGET) "
56+ rsync -avz --delete ./dist/ $(VPS_USER ) @$(VPS_HOST ) :$(TARGET ) /
57+ $(REMOTE_CMD ) " cd $( RELEASES_DIR) && ln -snf $( TIMESTAMP) current"
58+ @echo " \n\n**** Deployment complete.\n\n"
59+ endif
You can’t perform that action at this time.
0 commit comments