Skip to content

Commit

Permalink
Versioned docs releases - full site copy (#240)
Browse files Browse the repository at this point in the history
* refactor(*): versioned releases

use full site copy insted on content post-processing
add steps to build versioned docs copy to codefresh pipeline

* fix makefile
  • Loading branch information
alebabai authored and osterman committed Nov 1, 2018
1 parent 8e37623 commit f9209e5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@ themes/cloudposse/static/js/*
static/webfonts/*
static/css/*
static/js/*
content/release/*
12 changes: 1 addition & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,8 @@ components/build: utterances/build \
front/build
@exit 0

content/release-copy:
ifeq ($(SEMVERSION_TAG),)
@exit 0
else
mkdir -p release/$(SEMVERSION_TAG)
cp -r content/* release/$(SEMVERSION_TAG)
mv release content
endif

## Generate all static content (outputs to public/) using local environment
hugo/build: components/build \
content/release-copy
hugo/build: components/build
@[ "$(HUGO_PUBLISH_DIR)" != "/" ] || (echo "Invalid HUGO_PUBLISH_DIR=$(HUGO_PUBLISH_DIR)"; exit 1)
rm -rf $(HUGO_PUBLISH_DIR)
$(HUGO) --templateMetrics --stepAnalysis --config $(HUGO_CONFIG)
Expand Down
16 changes: 16 additions & 0 deletions codefresh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,22 @@ steps:
- make release
- make hugo/build

build_versioned_release:
title: Building Hugo static site...
image: '${{build_image}}'
working_directory: ./
environment:
- "HUGO_URL=${{HUGO_URL}}/release/${{SEMVERSION_TAG}}"
- "HUGO_PUBLISH_DIR=${{HUGO_PUBLISH_DIR}}/release/${{SEMVERSION_TAG}}"
commands:
- make lint
- make release
- make hugo/build
when:
condition:
all:
executeForTag: "'${{SEMVERSION_TAG}}' != ''"

test:
title: Running tests...
image: '${{build_image}}'
Expand Down

0 comments on commit f9209e5

Please sign in to comment.