Nuxt/.circleci/config.yml
2017-11-24 20:16:03 +03:30

46 lines
1.0 KiB
YAML
Executable File

version: 2
jobs:
build:
working_directory: /usr/src/app
docker:
- image: banian/node-headless-chrome
steps:
# Checkout repository
- checkout
# Restore cache
- restore_cache:
key: yarn-{{ checksum "yarn.lock" }}
# Install dependencies
- run:
name: Install Dependencies
command: NODE_ENV=dev yarn
# Keep cache
- save_cache:
key: yarn-{{ checksum "yarn.lock" }}
paths:
- "node_modules"
# Build
- run:
name: Build
command: |
yarn build
# Test
- run:
name: Tests
command: yarn test && yarn coverage
# Release next
- run:
name: Publish nuxt-next
command: |
if [ "${CIRCLE_BRANCH}" == "dev" ]; then
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
echo "//registry.yarnpkg.com/:_authToken=$NPM_TOKEN" >> ~/.npmrc
npm run release-next
fi