52af6e973b
This adopts pattern used by Vault, where we split CircleCI yaml config into multiple files that get packed and translated to 2.0. This has two motivations: First, to ease translating config to CircleCI 2.0 so it can run on Enterprise private repository. Second and most importantly, it also adding Enterprise specific jobs in separate files with reduced config file merging conflict resolution.
31 lines
821 B
YAML
31 lines
821 B
YAML
# setting the working_directory along with the checkout path allows us to not have
|
|
# to cd into the website/ directory for commands
|
|
working_directory: ~/project/website
|
|
docker:
|
|
- image: hashicorp/middleman-hashicorp:0.3.35
|
|
steps:
|
|
- checkout:
|
|
path: ~/project
|
|
|
|
# restores gem cache
|
|
- restore_cache:
|
|
key: static-site-gems-v1-{{ checksum "Gemfile.lock" }}
|
|
|
|
- run:
|
|
name: install gems
|
|
command: bundle check || bundle install --path vendor/bundle --retry=3
|
|
|
|
# saves gem cache if we have changed the Gemfile
|
|
- save_cache:
|
|
key: static-site-gems-v1-{{ checksum "Gemfile.lock" }}
|
|
paths:
|
|
- ~/project/website/vendor/bundle
|
|
|
|
- run:
|
|
name: middleman build
|
|
command: bundle exec middleman build
|
|
|
|
- run:
|
|
name: website deploy
|
|
command: ./scripts/deploy.sh
|