# This file is a template, and might need editing before it works on your project.
# Full project: https://gitlab.com/pages/plain-html
#
preprocessing:
  stage: build
  allow_failure: false
  image: 
    name: alpine:latest
  script:
    - apk add --no-cache --upgrade bash
    - ./preprocMd.sh
  artifacts:
    paths:
      - build/*.md


pandoc: 
  stage: test
  dependencies: [preprocessing]
  image:      
    name: pandoc/latex:latest
    entrypoint: ["/bin/sh", "-c"]
  script:
    - pandoc --standalone topics/topic-template.md -o build/topic-template.html  --mathjax
  artifacts:
    paths:
      - build/*.html



pages:
  stage: deploy
  script:
    - mkdir .public
    - cp -r build/*.html .public
    - mv .public public
  artifacts:
    paths:
      - public
  rules:
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
