forked from circleci/circleci-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml
25 lines (23 loc) · 1.38 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
machine:
environment:
NOKOGIRI_USE_SYSTEM_LIBRARIES: true # speeds up installation of html-proofer
dependencies:
post:
# https://github.com/jekyll/jekyll/issues/4122
#- bundle exec jekyll build -s jekyll -d jekyll/_site/docs/
# We want to expose the version file to public for the reusability
- cp jekyll/_data/trusty/versions.json jekyll/environments/trusty.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
- JEKYLL_ENV=production bundle exec jekyll build --config jekyll/_config.yml,jekyll/_config_staging.yml --source jekyll --destination jekyll/_staging_site/docs/ --future --drafts --unpublished
test:
post:
# --empty-alt-ignore is temporary
- 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/_staging_site/docs s3://static-staging.circleci.com/docs/ --delete
- aws s3 sync jekyll/_site/docs s3://circle-production-static-site/docs/ --delete