.gitlab-ci.yml 1.08 KB
Newer Older
1
image: node:10.14.2-alpine
Dan Allen's avatar
Dan Allen committed
2
stages: [setup, verify, deploy]
3 4 5 6 7
yarn:
  stage: setup
  cache:
    paths:
    - .yarn-cache/
8
  script:
9
  - &run_yarn
10
    yarn --cache-folder=.yarn-cache --pure-lockfile > /dev/null
11 12
lint:
  stage: verify
13
  cache: &pull_cache
14 15
    policy: pull
    paths:
16 17 18 19
    - .yarn-cache/
  script:
  - *run_yarn
  - node_modules/.bin/gulp lint
20
bundle-stable:
21
  stage: deploy
22 23
  only:
  - master@antora/antora-ui-default
24 25 26
  cache: *pull_cache
  script:
  - *run_yarn
Dan Allen's avatar
Dan Allen committed
27
  - node_modules/.bin/gulp bundle
28 29 30 31 32 33 34
  artifacts:
    paths:
    - build/ui-bundle.zip
bundle-dev:
  stage: deploy
  except:
  - master
35 36 37
  cache: *pull_cache
  script:
  - *run_yarn
Dan Allen's avatar
Dan Allen committed
38
  - node_modules/.bin/gulp bundle
39
  artifacts:
40
    expire_in: 1 day # unless marked as keep from job page
41 42
    paths:
    - build/ui-bundle.zip
43 44 45
pages:
  stage: deploy
  only:
46
  - master@antora/antora-ui-default
47
  cache: *pull_cache
48
  script:
49
  - *run_yarn
Dan Allen's avatar
Dan Allen committed
50
  - node_modules/.bin/gulp preview:build
51 52
  # FIXME figure out a way to avoid copying these files to preview site
  - rm -rf public/_/{helpers,layouts,partials}
53 54 55
  artifacts:
    paths:
    - public