ci: publish: Run a dry run for PR builds
dustin/dustin.web/pipeline/pr-master This commit looks good Details
dustin/dustin.web/pipeline/head This commit looks good Details

Only actually publish when building the *master* branch.
pull/1/head
Dustin 2022-12-02 22:07:09 -06:00
parent fab714379c
commit 5effaf78c2
1 changed files with 9 additions and 1 deletions

View File

@ -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}