Yield generated for ba2c4e78-85f0-4f44-a845-47decc5fe3ea
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.
 
 
 

64 lines
1.6 KiB

version: 2
jobs:
install-dependencies:
docker:
- image: circleci/node:dubnium-browsers
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- dependencies-{{ checksum "package.json" }}-{{ .Environment.CACHE_VERSION }}
- dependencies-
- run: yarn global add node-gyp && yarn install
- save_cache:
paths:
- node_modules
key: dependencies-{{ checksum "package.json" }}-{{ .Environment.CACHE_VERSION }}
build:
docker:
- image: circleci/node:dubnium-browsers
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- dependencies-{{ checksum "package.json" }}-{{ .Environment.CACHE_VERSION }}
- dependencies-
- run: yarn build
- run:
name: Copy deployment artifacts to workspace
command: |
cp dist/ /tmp/dist -r
- store_artifacts:
path: /tmp/dist
- persist_to_workspace:
root: /tmp
paths:
- dist
front-deploy:
docker:
- image: circleci/node:dubnium-browsers
working_directory: ~/dist
steps:
- attach_workspace:
at: /tmp
- run:
name: Deploy app
command: |
npx netlify-cli deploy --site $NETLIFY_SITE_ID --auth $NETLIFY_ACCESS_TOKEN --dir /tmp/dist --prod
workflows:
version: 2
build-deploy_frontend:
jobs:
- install-dependencies
- build:
requires:
- install-dependencies
- front-deploy