Skip to content
Snippets Groups Projects
Forked from R3 / school / courses
322 commits behind the upstream repository.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
.gitlab-ci.yml 2.22 KiB
stages:
  - retrieve
  - generate
  - build
  - deploy

retrieve:repo:
  image:
    name: alpine/git:latest
    entrypoint: [""]
  stage: retrieve
  script:
    - git clone https://$CI_DEPLOY_TOKEN:$CI_DEPLOY_PASSWORD@git-r3lab.uni.lu/R3/school/courses.lcsb.uni.lu.git
  artifacts:
    expire_in: 1 day
    paths:
      - courses.lcsb.uni.lu
  rules:
    - if: $CI_COMMIT_BRANCH == "develop"
    - if: $CI_COMMIT_BRANCH == "master"

generate:index:
  image: python
  stage: generate
  rules:
    - if: $CI_COMMIT_BRANCH == "develop"
    - if: $CI_COMMIT_BRANCH == "master"
  script:
    - python .ci/generateIndex.py
  artifacts:
    expire_in: 1 day
    paths:
      - courses.lcsb.uni.lu

build:website:
  image: git-r3lab.uni.lu:4567/r3/docker/jekyll-lcsb
  stage: build
  rules:
    - if: $CI_COMMIT_BRANCH == "develop"
    - if: $CI_COMMIT_BRANCH == "master"
  before_script:
    - cd courses.lcsb.uni.lu
    - gem install bundler -v2.0.2
    - bundle install && bundle update jekyll-theme-lcsb-default && bundle update jekyll-theme-lcsb-frozen-components
    - cd ..
  script:
    - cd courses.lcsb.uni.lu
    - bundle exec jekyll build -d site --config "_config.yml"
    - mv site ../.
    - cd ..
  artifacts:
    expire_in: 1 day
    paths:
      - site
  variables:
    JEKYLL_ENV: production

build:courses:
  image: git-r3lab.uni.lu:4567/r3/docker/nodejs-yarn-grunt
  stage: build
  rules:
    - if: $CI_COMMIT_BRANCH == "develop"
    - if: $CI_COMMIT_BRANCH == "master"
  before_script:
    - git submodule update --recursive --init
  script:
    - bash .ci/deploy.sh
  artifacts:
    expire_in: 1 day
    paths: