.gitlab-ci.yml 1.24 KB
Newer Older
1
2
3
4
5
6
7
8
9
image: ruby:2.6.4

stages:
  - build
  - deploy
  - after_deploy

before_script:
  - gem install bundler jekyll --no-document
10
  - bundle update --jobs $(nproc)  "${FLAGS[@]}"
11

12
13
14
15
16
17
run_jekyll_latest_dependencies:
  stage: build
  script:
    - bundle exec jekyll build -d public
  allow_failure: true

18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
run_jekyll_production:
  stage: build
  script: 
    - cp _data/team.yml team.yml
    - bundle exec jekyll build -d public
  artifacts:
    paths:
      - public
      - team.yml
    expire_in: 1d
  only:
    refs:
      - gitlab_ci_setup_production

pages:
  stage: deploy
  script:
    - echo "deploy"
  artifacts:
    paths:
      - public
      - team.yml
    expire_in: 1d
  dependencies:
    - run_jekyll_production
  only:
    refs:
      - gitlab_ci_setup_production

team_map:
  stage: after_deploy
  script: 
    - "HEADERS=\'{\"token\":\"'\"${TOKEN_TRIGGER_GITLAB_CI_SETUP}\"'\", \"ref\":\"gitlab_ci_setup_production\"}\'; curl -X POST -H \"Private-Token: ${MY_PERSONAL_ACCESS_TOKEN_API}\" -H \"Content-Type: application/json\" -d \"$HEADERS\" https://gitlab.hzdr.de/api/v4/projects/960/trigger/pipeline"
  artifacts:
    paths:
      - public
      - team.yml
    expire_in: 1d
  dependencies:
    - pages
  only:
    refs:
      - gitlab_ci_setup_production