image: node:12 cache: key: ${CI_COMMIT_SHA}_node_modules untracked: true paths: - node_modules/ policy: pull-push variables: NODE_MODULES_PATH: /runner-cache/frontend/$CI_COMMIT_SHA/node_modules stages: - prepare - build - deploy install_dependencies: before_script: - /bin/bash /var/run/ci/mkdir .sh $NODE_MODULES_PATH - ln -s $NODE_MODULES_PATH . stage: prepare script: - yarn install .build_job: before_script: - ln -s $NODE_MODULES_PATH stage: build script: - echo "build" - yarn build artifacts: paths: - build/ untracked: false expire_in: 30 days build_1: extends: .build_job build_2: extends: .build_job