From e817c9b2331fcc41cc178600968351402ea9ec87 Mon Sep 17 00:00:00 2001 From: Andriy Knysh Date: Mon, 14 May 2018 14:04:36 -0400 Subject: [PATCH] Only deploy on tagged releases to `master` branch (#48) --- .gitignore | 3 +++ codefresh.yml | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/.gitignore b/.gitignore index f019f4305..f64cb5eb8 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,6 @@ build-harness/ public/* .gitkeep *.swp +.idea +*.iml +package-lock.json diff --git a/codefresh.yml b/codefresh.yml index 00541a996..e58deda40 100644 --- a/codefresh.yml +++ b/codefresh.yml @@ -10,6 +10,16 @@ steps: - cf_export BUILD_HARNESS_VERSION=0.5.5 - cf_export HUGO_CONFIG=deploy.toml + semver: + title: Export semantic version + image: cloudposse/build-harness:${{BUILD_HARNESS_VERSION}} + working_directory: ./ + commands: + - make git/show + - make git/export | tee -a ${{CF_VOLUME_PATH}}/env_vars_to_export + - make semver/show + - make semver/export | tee -a ${{CF_VOLUME_PATH}}/env_vars_to_export + build: title: Building Hugo static site... image: cloudposse/build-harness:${{BUILD_HARNESS_VERSION}} @@ -37,6 +47,7 @@ steps: condition: all: executeForMasterBranch: "'${{CF_BRANCH}}' == '${{MASTER_BRANCH}}'" + executeForTag: "'${{SEMVERSION_TAG}}' != ''" reindex: title: Updating algolia search index... @@ -48,3 +59,4 @@ steps: condition: all: executeForMasterBranch: "'${{CF_BRANCH}}' == '${{MASTER_BRANCH}}'" + executeForTag: "'${{SEMVERSION_TAG}}' != ''"