.gitlab-ci.yml 667 Bytes
Newer Older
1
image: ruby:2.6
Christophe Trefois's avatar
Christophe Trefois committed
2

3
4
5
build the website:
  stage: build
  before_script:
Yohan Jarosz's avatar
Yohan Jarosz committed
6
  - bundle install && bundle update
Christophe Trefois's avatar
Christophe Trefois committed
7
  script:
8
9
10
11
  - '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
12
  artifacts:
13
    expire_in: 3 days
Christophe Trefois's avatar
Christophe Trefois committed
14
15
    paths:
    - test
16
17
  variables:
    JEKYLL_ENV: production  
Christophe Trefois's avatar
Christophe Trefois committed
18

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