paris/.circleci/config.yml

114 строки
2.7 KiB
YAML

version: 2
jobs:
build:
docker:
- image: circleci/node:10-browsers
working_directory: ~/repo
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run:
name: Install dependencies
command: npm install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- run:
name: test
command: npm run test
- run:
name: build
command: npm run build
# publish-docs:
# docker:
# # specify the version you desire here
# - image: circleci/node:10-browsers
# working_directory: ~/repo
# environment:
# - SOURCE_BRANCH: master
# - TARGET_BRANCH: gh-pages
# steps:
# - add_ssh_keys:
# fingerprints:
# - '6a:f7:26:f6:f6:43:4b:96:7c:f5:1b:0a:cc:d2:bc:11'
# - checkout
#
# # Download and cache dependencies
# - restore_cache:
# keys:
# - v1-dependencies-{{ checksum "package.json" }}
# # fallback to using the latest cache if no exact match is found
# - v1-dependencies-
#
# - run:
# name: Install dependencies
# command: npm ci
#
# - save_cache:
# paths:
# - node_modules
# key: v1-dependencies-{{ checksum "package.json" }}
#
# - run:
# name: test docs
# command: npm run test:ci -- docs
#
# - run:
# name: build docs
# command: npm run build:demo:github
#
# - deploy:
# command: |
# if [ "${CIRCLE_BRANCH}" == "master" ]; then
# git config --global user.name "CircleCI"
# git config --global user.email "circleci@users.noreply.github.com"
#
# git clone $CIRCLE_REPOSITORY_URL out
#
# cd out
# git checkout $TARGET_BRANCH || git checkout --orphan $TARGET_BRANCH
# git rm -rf .
# cd ..
#
# npm run build:demo:github
#
# cp -a docs/. out/.
#
# mkdir -p out/.circleci && cp -a .circleci/. out/.circleci/.
# cd out
#
# git add -A
# git commit -m "Automated deployment to GitHub Pages: ${CIRCLE_SHA1}" --allow-empty
#
# git push origin $TARGET_BRANCH
#
# fi
workflows:
version: 2
build:
jobs:
- build
# build_and_publish-docs:
# jobs:
# - build
# - publish-docs:
# requires:
# - build
# filters:
# branches:
# only: master