Skip to content

Instantly share code, notes, and snippets.

@lior-amsalem
Created August 24, 2019 20:07
Show Gist options
  • Save lior-amsalem/6277c908dc498141c1f76bccce6ba3fd to your computer and use it in GitHub Desktop.
Save lior-amsalem/6277c908dc498141c1f76bccce6ba3fd to your computer and use it in GitHub Desktop.
Basic Circle Configuration
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
version: 2.1
jobs:
# Job #1
build:
# The primary container is an instance of the first image listed. The job's commands run in this container.
docker:
# specify the version you desire here
- image: circleci/node:11.10
working_directory: ~/app
steps:
- checkout
# cache dependencies (to speed automation process)
- 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 NPM dependencies - via yarn
command: yarn install
- run:
name: Build Production Assets
command: yarn run build
- persist_to_workspace:
# Must be an absolute path, or relative path from working_directory. This is a directory on the container which is
# taken to be the root directory of the workspace.
root: ~/app
# Must be relative path from root
paths:
- node_modules # contain dependencies
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment