# Javascript Node CircleCI 2.0 configuration file## Check https://circleci.com/docs/2.0/language-javascript/ for more details#version2
references
container_config&container_config
docker
imagecircleci/node9
working_directory~/repo
jobs
checkout_code
<<*container_config
steps
checkoutsave_cache
keyv1-repo- .Environment.CIRCLE_SHA1
paths~/repo
bundle_dependencies
<<*container_config
steps
restore_cache
keyv1-repo- .Environment.CIRCLE_SHA1
restore_cache
keyv1-bundle- checksum "yarn.lock"
run
nameinstall-dependencies
commandyarn install
save_cache
keyv1-bundle- checksum "yarn.lock"
paths
node_modulesinstall_up
<<*container_config
steps
run
nameinstall-up-runtime
command
curl -sf https://up.apex.sh/install | bash -s -- -b ~/up_bin ~/up_bin/up -v upgradesave_cache
keyv1-bin- .Environment.CIRCLE_SHA1
paths
~/up_bindeploy_to_staging
<<*container_config
steps
restore_cache
keyv1-repo- .Environment.CIRCLE_SHA1
restore_cache
keyv1-bundle- checksum "yarn.lock"
restore_cache
keyv1-bin- .Environment.CIRCLE_SHA1
deploy
namedeploy-with-up
command
~/up_bin/up deploy stagingdeploy_to_production
<<*container_config
steps
restore_cache
keyv1-repo- .Environment.CIRCLE_SHA1
restore_cache
keyv1-bundle- checksum "yarn.lock"
restore_cache
keyv1-bin- .Environment.CIRCLE_SHA1
deploy
namedeploy-with-up
command
~/up_bin/up deploy production
workflows
version2
build_and_deploy
jobs
checkout_codebundle_dependencies
requires
checkout_codeinstall_updeploy_to_staging
filters
branches
only
developrequires
install_upbundle_dependenciesdeploy_to_production
filters
branches
only
masterrequires
install_upbundle_dependencies