Unverified Commit a270143d authored by Ryan Hofschneider's avatar Ryan Hofschneider Committed by GitHub

Merge pull request #112 from 18F/rmh-90

Copy and tweak CircleCI config from TTS handbook
parents dca4ee1d 1e1db204
version: 2.1
jobs:
build:
working_directory: ~/development-guide
docker:
- image: circleci/ruby:2.6.1
environment:
# fix encoding
- LANG: C.UTF-8
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v2-dependencies-{{ checksum "Gemfile.lock" }}
# fallback to using the latest cache if no exact match is found
- v2-dependencies-
- run:
name: install dependencies
command: bundle install --jobs=4 --retry=3 --path vendor/bundle
- save_cache:
paths:
- ./vendor/bundle
key: v2-dependencies-{{ checksum "Gemfile.lock" }}
- run:
name: checking internal links
# grep for pages with markdown links to local pages (links with "(/").
# if found, fail build with error message (grep returns the opposite
# exit code from what we’re hoping for, so the '!' negates the
# expression to pass/fail the build as expected).
command: |
! (grep -Erl "\(/|href=['\"]/" _pages && echo "ERROR: Internal links must be prefixed with {{site.baseurl}} to work correctly with Federalist Previews. Fix the above pages.")
- run:
name: build site
command: bundle exec jekyll build
- run:
name: htmlproofer
command: bundle exec htmlproofer ./_site htmlproofer --disable-external
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment