stages:
  - slides
  - site




pages:
  image: python:3-alpine
  stage: site
  script:
    - pip install j2static
    - mkdir public
    - j2static generate
    - mv slides_pdf public
    - mv site/** public
  artifacts:
    paths:
    - public
  only:
  - master

slides:
  image: blang/latex:latest
  stage: slides
  script:
    - apt update && apt install -y git
    - git clone https://github.com/matze/mtheme.git
    - cd mtheme && make sty && make install sty
    - latexmk -pdf slides/*.tex
    - mkdir slides_pdf
    - mv slides/*.pdf slides_pdf
  artifacts:
    paths:
    - slides_pdf

