forked from circleci/circleci-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
27 lines (23 loc) · 1.34 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
machine:
environment:
NOKOGIRI_USE_SYSTEM_LIBRARIES: true # speeds up installation of html-proofer
dependencies:
cache_directories:
- ~/bin
post:
# We want to expose the version file to public for the reusability
- cp jekyll/_data/trusty/versions.json jekyll/environments/trusty.json # Remove trusty.json. It's the same as ubuntu-14.04-XXL.json
- cp jekyll/_data/trusty/versions-ubuntu-14.04-XXL.json jekyll/environments/ubuntu-14.04-XXL.json
- cp jekyll/_data/trusty/versions-ubuntu-14.04-XL.json jekyll/environments/ubuntu-14.04-XL.json
- cp jekyll/_data/trusty/versions-ubuntu-14.04-XL.json jekyll/environments/ubuntu-14.04-XXL-upstart.json
# https://github.com/jekyll/jekyll/issues/4713
- JEKYLL_ENV=production bundle exec jekyll build --config jekyll/_config.yml,jekyll/_config_production.yml --source jekyll --destination jekyll/_site/docs/ 2>&1 | tee $CIRCLE_ARTIFACTS/build-results.txt
- if grep -qi "error" $CIRCLE_ARTIFACTS/build-results.txt; then exit 2; fi
test:
post:
- bundle exec htmlproofer jekyll/_site --allow-hash-href --check-favicon --check-html --disable-external --empty-alt-ignore | tee $CIRCLE_ARTIFACTS/htmlproofer-results.txt; exit ${PIPESTATUS[0]}
deployment:
prod:
branch: master
commands:
- aws s3 sync jekyll/_site/docs s3://circle-production-static-site/docs/ --delete