Loading .gitlab-ci.yml +6 −18 Original line number Diff line number Diff line Loading @@ -4,7 +4,6 @@ stages: - build - deploy # global cache settings for all jobs # Ensure compatibility with the install job # goal: the install job loads the cache and Loading @@ -18,29 +17,18 @@ cache: - node_modules/ policy: pull # prevent subsequent jobs from modifying cache # # ATTN mono-repo users: with only additional node_modules, # # add up to 2 additional cache entries. # # See limitations in #10. # - key: # files: # - core/pkg1/package-lock.json # paths: # - core/pkg1/node_modules/ # policy: pull # prevent jobs from modifying cache before_script: # define cache dir & use it npm! - npm ci --cache node_modules/ --prefer-offline # # monorepo users: run secondary install actions # - npx lerna bootstrap -- --cache .npm/ --prefer-offline - npm run lint - npm run build build: stage: build # global cache settings are inherited to grab `node_modules` script: - npm run build - npm run lint artifacts: paths: - dist/ # where ever your build results are stored Loading @@ -50,9 +38,9 @@ pages: when: on_success # only if previous stages' jobs all succeeded # override inherited cache settings since node_modules is not needed script: - echo 'Pages deployment job' - mv dist public artifacts: paths: - dist - public rules: - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH No newline at end of file Loading
.gitlab-ci.yml +6 −18 Original line number Diff line number Diff line Loading @@ -4,7 +4,6 @@ stages: - build - deploy # global cache settings for all jobs # Ensure compatibility with the install job # goal: the install job loads the cache and Loading @@ -18,29 +17,18 @@ cache: - node_modules/ policy: pull # prevent subsequent jobs from modifying cache # # ATTN mono-repo users: with only additional node_modules, # # add up to 2 additional cache entries. # # See limitations in #10. # - key: # files: # - core/pkg1/package-lock.json # paths: # - core/pkg1/node_modules/ # policy: pull # prevent jobs from modifying cache before_script: # define cache dir & use it npm! - npm ci --cache node_modules/ --prefer-offline # # monorepo users: run secondary install actions # - npx lerna bootstrap -- --cache .npm/ --prefer-offline - npm run lint - npm run build build: stage: build # global cache settings are inherited to grab `node_modules` script: - npm run build - npm run lint artifacts: paths: - dist/ # where ever your build results are stored Loading @@ -50,9 +38,9 @@ pages: when: on_success # only if previous stages' jobs all succeeded # override inherited cache settings since node_modules is not needed script: - echo 'Pages deployment job' - mv dist public artifacts: paths: - dist - public rules: - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH No newline at end of file