diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a3b2521e9b18e5ea4231a865dfad06329314558c..d8d39af91b2b41b73bbf9cdeca761864a3d49105 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,26 +1,34 @@ -image: node:alpine # Much smaller than other variants, faster and more resource effective - -stages: - - install_dependencies - - build_project +image: node:alpine cache: - key: "${CI_COMMIT_REF_SLUG}" # Branch-specific cache keys to have separate caches across branches. + key: "${CI_COMMIT_REF_SLUG}" paths: - node_modules/ + - build/ + +stages: + - install + - build install_dependencies: - stage: install_dependencies + stage: install script: - npm ci + cache: + key: ${CI_COMMIT_REF_SLUG} + paths: + - node_modules/ + policy: push build_project: - stage: build_project - before_script: - - ls -l node_modules/.bin - - whoami + stage: build script: + - npm ci - npm run build - after_script: - - ls -l - + dependencies: + - install_dependencies + cache: + key: "${CI_COMMIT_REF_SLUG}" + paths: + - node_modules/ + policy: pull