Skip to content

Commit

Permalink
Merge pull request #93 from ThoughtWorksInc/migra-para-circle-ci-3
Browse files Browse the repository at this point in the history
Migração para CircleCI
  • Loading branch information
rogeriochaves authored Jun 7, 2017
2 parents 26f34ac + 8a39430 commit fdbbf8a
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
29 changes: 29 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version: 2
jobs:
build:
working_directory: ~/guia-de-desenvolvimento-tecnico
docker:
- image: circleci/node:7
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
- run:
name: install-dependencies
command: npm install
- save_cache:
key: dependency-cache-{{ checksum "package.json" }}
paths:
- node_modules
- run:
name: lint
command: npm test
- run:
name: check-links
command: npm run check-link-diff
- deploy:
name: deploy
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
npm run deploy
fi
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"scripts": {
"start": "gitbook serve",
"build": "gitbook build",
"test": "markdownlint --config lint.json {.,topics}/*.md",
"generate-diff": "git diff origin/master {.,topics}/*.md | grep -v '^-'",
"test": "markdownlint --config lint.json *.md topics/*.md",
"generate-diff": "git diff origin/master *.md topics/*.md | grep -v '^-' || echo ''",
"check-link-diff": "npm run generate-diff | node scripts/markdownLinkCheck.js",
"check-link-local": "cat *.md topics/*.md | node scripts/markdownLinkCheck.js",
"watch": "onchange '**/*.md' -v -- npm test",
Expand Down

0 comments on commit fdbbf8a

Please sign in to comment.