Skip to content
Snippets Groups Projects
.gitlab-ci.yml 737 B
Newer Older
Augustin Lemesle's avatar
Augustin Lemesle committed
# This file is a template, and might need editing before it works on your project.
# Template project: https://gitlab.com/pages/jekyll
# Docs: https://docs.gitlab.com/ce/pages/
Augustin Lemesle's avatar
Augustin Lemesle committed
image: ocaml/opam:latest
Augustin Lemesle's avatar
Augustin Lemesle committed

variables:
  JEKYLL_ENV: production

before_script:
Augustin Lemesle's avatar
Augustin Lemesle committed
- gem install bundler -v '2.0.2'
Augustin Lemesle's avatar
Augustin Lemesle committed
- bundle install
Augustin Lemesle's avatar
Augustin Lemesle committed
- apt install ocaml
Augustin Lemesle's avatar
Augustin Lemesle committed

test:
  stage: test
  script:
Augustin Lemesle's avatar
Augustin Lemesle committed
  - cd generator; make html; make clean; cd ..
Augustin Lemesle's avatar
Augustin Lemesle committed
  - bundle exec jekyll build -d test
  artifacts:
    paths:
    - test
Augustin Lemesle's avatar
Augustin Lemesle committed
    expire_in: 1 month
Augustin Lemesle's avatar
Augustin Lemesle committed
  except:
  - master

pages:
  stage: deploy
  script:
Augustin Lemesle's avatar
Augustin Lemesle committed
  - cd generator; make html; make clean; cd ..
Augustin Lemesle's avatar
Augustin Lemesle committed
  - bundle exec jekyll build -d public
  artifacts:
    paths:
    - public
Augustin Lemesle's avatar
Augustin Lemesle committed
    expire_in: 1 month
Augustin Lemesle's avatar
Augustin Lemesle committed
  only:
  - master
Augustin Lemesle's avatar
Augustin Lemesle committed
  tags:
  - docker