.gitlab-ci.yml 807 Bytes
Newer Older
1
2
# In case something goes horribly wrong, you can fall back to `image: ruby:latest`
image: git-r3lab.uni.lu:4567/r3/docker/jekyll-lcsb:1.0
Christophe Trefois's avatar
Christophe Trefois committed
3

4
5
6
build the website:
  stage: build
  before_script:
7
  - gem install bundler -v2.0.2
Yohan Jarosz's avatar
Yohan Jarosz committed
8
  - bundle install && bundle update
Christophe Trefois's avatar
Christophe Trefois committed
9
  script:
10
11
12
13
  - 'echo "baseurl: /$CI_PROJECT_NAME" >> _config_ci.yml'
  - 'echo "url: https://$CI_PROJECT_NAMESPACE.$CI_PAGES_DOMAIN" >> _config_ci.yml'
  - bundle exec jekyll build -d test --config "_config.yml,_config_ci.yml"
  - 'echo $CI_COMMIT_SHA > test/version'
Christophe Trefois's avatar
Christophe Trefois committed
14
  artifacts:
15
    expire_in: 3 days
Christophe Trefois's avatar
Christophe Trefois committed
16
17
    paths:
    - test
18
  variables:
19
    JEKYLL_ENV: production
Christophe Trefois's avatar
Christophe Trefois committed
20

21
pages:
Christophe Trefois's avatar
Christophe Trefois committed
22
  stage: deploy
23
24
  only:
  - master
Christophe Trefois's avatar
Christophe Trefois committed
25
  script:
26
27
  - mv test public
  - echo "Your website is available at $CI_PAGES_URL"
Christophe Trefois's avatar
Christophe Trefois committed
28
  artifacts:
Jacek Lebioda's avatar
Jacek Lebioda committed
29
    expire_in: 1 week
Christophe Trefois's avatar
Christophe Trefois committed
30
31
    paths:
    - public