# Build CollectionBuilder using Jekyll

# use Ruby image that matches the version you are using locally
image: ruby:3.1

# set to production environment build
variables:
  JEKYLL_ENV: production
  LC_ALL: C.UTF-8

# install bundler, then install from Gemfile
before_script:
  - gem install bundler
  - bundle install

# build and deploy site
pages:
  stage: deploy
  script:
    - bundle exec jekyll build -d public
  artifacts:
    paths:
      - public
  only:
    variables:
      - $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
