Skip to content

Commit

Permalink
Only deploy on tagged releases to master branch (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
aknysh authored May 14, 2018
1 parent d9f138d commit e817c9b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ build-harness/
public/*
.gitkeep
*.swp
.idea
*.iml
package-lock.json
12 changes: 12 additions & 0 deletions codefresh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down Expand Up @@ -37,6 +47,7 @@ steps:
condition:
all:
executeForMasterBranch: "'${{CF_BRANCH}}' == '${{MASTER_BRANCH}}'"
executeForTag: "'${{SEMVERSION_TAG}}' != ''"

reindex:
title: Updating algolia search index...
Expand All @@ -48,3 +59,4 @@ steps:
condition:
all:
executeForMasterBranch: "'${{CF_BRANCH}}' == '${{MASTER_BRANCH}}'"
executeForTag: "'${{SEMVERSION_TAG}}' != ''"

0 comments on commit e817c9b

Please sign in to comment.