.gitlab-ci.yml 571 Bytes
Newer Older
kaiyou's avatar
kaiyou committed
1 2 3 4
stages:
  - assets
  - pages

kaiyou's avatar
kaiyou committed
5
node:
kaiyou's avatar
kaiyou committed
6
  stage: assets
kaiyou's avatar
kaiyou committed
7 8 9 10 11 12 13 14
  image: node:8
  script:
    - npm install
  cache:
    paths:
      - node_modules
  only:
    - master
kaiyou's avatar
kaiyou committed
15
    - dev
kaiyou's avatar
kaiyou committed
16 17

pages:
kaiyou's avatar
kaiyou committed
18
  stage: pages
kaiyou's avatar
kaiyou committed
19
  image: monachus/hugo
kaiyou's avatar
kaiyou committed
20
  script:
kaiyou's avatar
kaiyou committed
21 22
    - git fetch --all
    - git checkout origin/master
kaiyou's avatar
kaiyou committed
23
    - hugo -b https://tedomum.net --cleanDestinationDir -d ./public
kaiyou's avatar
kaiyou committed
24
    - git checkout origin/dev
kaiyou's avatar
kaiyou committed
25
    - hugo -b https://tedomum.net/dev -D -F -d ./public/dev
kaiyou's avatar
kaiyou committed
26 27 28 29 30 31
  cache:
    paths:
      - node_modules
  artifacts:
    paths:
      - public
kaiyou's avatar
kaiyou committed
32
    expire_in: 2 weeks
kaiyou's avatar
kaiyou committed
33 34
  only:
    - master
kaiyou's avatar
kaiyou committed
35
    - dev