mirror of
https://github.com/ConnectedHumber/Air-Quality-Web
synced 2024-11-22 06:23:01 +00:00
Only deploy on the master branch
This commit is contained in:
parent
ce258429f6
commit
a45001a75f
1 changed files with 4 additions and 1 deletions
5
build
5
build
|
@ -272,7 +272,10 @@ task_ci() {
|
|||
tasks_run setup setup-dev
|
||||
NODE_ENV="production" tasks_run client docs archive;
|
||||
|
||||
if [ "${GIT_REF_NAME}" == "refs/heads/master" ]; then
|
||||
latest_commit="$(git log -n 1 --pretty=format:"%H")";
|
||||
current_commit="$(git rev-parse HEAD)";
|
||||
|
||||
if [ "${GIT_REF_NAME}" == "refs/heads/master" ] && [ "${latest_commit}" == "${current_commit}" ]; then
|
||||
tasks_run deploy;
|
||||
else
|
||||
echo "Not deploying, as this build wasn't on the master branch.";
|
||||
|
|
Loading…
Reference in a new issue