Created
October 14, 2021 07:41
-
-
Save codetot/0e4bc8023f1b9ed2d496f2c1a60872cd to your computer and use it in GitHub Desktop.
CircleCI Alias for npm restore cache, install npm and save cache
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aliases: | |
restore_cache: &restore_cache | |
restore_cache: | |
name: Restore Npm Package Cache | |
keys: | |
- v{{ .Environment.versionCache }}-deps-{{ .Branch }}-{{ checksum "package-lock.json" }}-{{ checksum ".circleci/config.yml" }} | |
install_node_modules: &install_node_modules | |
run: | |
name: Install NPM dependencies | |
command: npm install | |
save_cache: &save_cache | |
save_cache: | |
name: Save NPM modules cache | |
key: v{{ .Environment.versionCache }}-deps-{{ .Branch }}-{{ checksum "package-lock.json" }}-{{ checksum ".circleci/config.yml" }} | |
paths: | |
- ./node_modules/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment