Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# The document template
The document template is for turning a simple mardown file into a PDF via LaTeX automatically in GitLab. This can be done in any repository.
## Using the template
1. Create a mardown document in the repository. For example `file.md` in directory `documents`
1. Create a file called `.gitlab-ci.yml` in the root of the repository.
1. Copy the following code to `.gitlab-ci.yml`
```yaml
stages:
- build
#This job uses the template below. Modify this job to add files
compile:
extends: .compile
script:
- cd documents
- pandoc file.md -o flie.pdf -M documentclass=otfndoc
##### TEMPLATE STARTS
# Standard template for OTFN document jobs. Don't edit this here except to if the standard template updates
.compile:
image:
name: pandoc/latex
entrypoint: ["/bin/sh", "-c"]
stage: build
before_script:
- apk add git
- git clone https://gitlab.fabcity.hamburg/OTFN/design.git
- echo "TEXMFHOME = $(pwd)/design/texroot" >> $(kpsewhich texmf.cnf)
- tlmgr update --self
- tlmgr install roboto fontaxes sectsty
artifacts:
paths:
- "*.pdf"
- "**/*.pdf"
exclude:
- "design/**/*.pdf"
expire_in: 1 week
##### TEMPLATE ENDS
```
4. Save the file, commit it, and push to gitlab