default:
  image:
    name: pandoc/latex:latest
    entrypoint: [""]
  before_script:
    - apk add --no-cache build-base python3 python3-dev py3-pip ttf-freefont
    - pip install recipemd

check_filenames:
  allow_failure: true
  script:
    - apk add git
    - pip install unidecode
    - python3 ./_filenames.py
    - git status
    - git diff --exit-code >/dev/null # exit with 1 if there are renamed files

make_pdf:
  script:
    - tlmgr update --self
    - tlmgr update --all
    # Please try to keep this list short and document the purpose of each package
    #
    #               syntax highlight                                required by pandoc's latex template
    #               |       dependency of fvextra                   |
    #               |       |      IPA        Chinese               |
    #               |       |      |          |    custom list      |
    #               |       |      |          |    |        compile |
    - tlmgr install fvextra lineno cm-unicode ctex enumitem latexmk selnolig
    - ./make-pdf.py
  artifacts:
    paths:
      - "*.pdf"