From 5effaf78c2fd71832bc8625bf8f5278d5fdb82a6 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Fri, 2 Dec 2022 22:07:09 -0600 Subject: [PATCH] ci: publish: Run a dry run for PR builds Only actually publish when building the *master* branch. --- ci/publish.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ci/publish.sh b/ci/publish.sh index 990775b..06f60cf 100644 --- a/ci/publish.sh +++ b/ci/publish.sh @@ -2,4 +2,12 @@ PUBLISH_HOST=web0.pyrocufflink.blue PUBLISH_USER=webapp.dchwww PUBLISH_PATH=htdocs/ -rsync -aP public/ ${PUBLISH_USER}@${PUBLISH_HOST}:${PUBLISH_PATH} +case "${BRANCH_NAME}" in +master) + ;; +*) + DRY_RUN=1 + ;; +esac + +rsync -aP public/ ${PUBLISH_USER}@${PUBLISH_HOST}:${PUBLISH_PATH} ${DRY_RUN:+-n}