Yield generated for 1433ca7c-8f05-4e65-9f6e-83a4cdb57296
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

75 lines
1.8 KiB

version: 2
jobs:
build: &shared-config
docker:
- image: circleci/node:lts-fermium
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- dependencies-{{ checksum "package.json" }}-v1
- dependencies-
- run: yarn install
- save_cache:
paths:
- node_modules
key: dependencies-{{ checksum "package.json" }}-v1
testUnit:
<<: *shared-config
steps:
- checkout
- restore_cache:
key: dependencies-{{ checksum "package.json" }}-v1
- run: yarn test:unit
server-doc-build:
<<: *shared-config
steps:
- checkout
- restore_cache:
key: dependencies-{{ checksum "package.json" }}-v1
- run: yarn doc:build
- run:
name: Copy deployment artifacts to workspace
command: |
cp docs/ /tmp/server-doc -r
- store_artifacts:
path: /tmp/server-doc
- persist_to_workspace:
root: /tmp
paths:
- server-doc
server-doc-deploy:
<<: *shared-config
working_directory: ~/deploy-doc-server
steps:
- attach_workspace:
at: /tmp
- run:
name: Install netlify
command: yarn add netlify-cli -D
- run:
name: Deploy app
command: yarn netlify deploy --prod --dir=/tmp/server-doc
workflows:
version: 2
build-test-and-lint:
jobs:
- build
- testUnit:
requires:
- build
- server-doc-build:
requires:
- build
- testUnit
filters:
branches:
only: main
- server-doc-deploy:
requires:
- server-doc-build
filters:
branches:
only: main