---
stages:
  - build

variables:
  # At https://salsa.debian.org/salsa-ci-team/pipeline/container_registry one can see which images are available
  SALSA_CI_IMAGES: registry.salsa.debian.org/salsa-ci-team/pipeline
  BASE_CI_IMAGES: ${SALSA_CI_IMAGES}/base

build website on Stable:
  stage: build
  image: $BASE_CI_IMAGES:stable
  dependencies: []
  script:
    - apt-get update && apt-get upgrade -y
    - eatmydata apt-get install -y ruby-bundler ruby-dev build-essential
    - bundle install
    - bundle exec jekyll build
    - mkdir build
    - cp Gemfile Gemfile.lock build/
    - cp -r _site build/
  artifacts:
    paths:
      - build/

build website on Unstable:
  stage: build
  image: $BASE_CI_IMAGES:unstable
  dependencies: []
  script:
    - apt-get update && apt-get upgrade -y
    - eatmydata apt-get install -y ruby-bundler ruby-dev build-essential
    - bundle install
    - bundle exec jekyll build
    - mkdir build
    - cp Gemfile Gemfile.lock build/
    - cp -r _site build/
  artifacts:
    paths:
      - build/
