.gitlab-ci.yml 3.02 KB
Newer Older
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
1
2
3
stages:
  - build
  - deploy
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
4
  - pdfs 
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
5

Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
6
build_mkdocs:
7
  image: registry.gsi.upm.es/docs/mkdocs-material
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
8
9
10
11
  stage: build 
  only:
    - main
  script:
12
    - export ENABLE_PANDOC_EXPORT=1
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
13
    - mkdir -p data/en
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
14
    - mkdir data/es
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
15
16
    - mkdocs build -f config/en/mkdocs.yml --verbose --site-dir ../../data/en --no-directory-urls 
    - mkdocs build -f config/es/mkdocs.yml --verbose --site-dir ../../data/es --no-directory-urls 
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
17
18
19
20
  artifacts:
    paths:
      - data

Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
21
pages:
22
  image: registry.gsi.upm.es/docs/mkdocs-material
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
23
  stage: deploy
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
24
25
26
  only:
    - main
  script:
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
27
    - mkdir -p public/en
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
28
    - mkdir public/es
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
29
30
    - mkdocs build -f config/en/mkdocs.yml --verbose  --no-directory-urls 
    - mkdocs build -f config/es/mkdocs.yml --verbose  --no-directory-urls 
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
31
    - cp -r public/en/* public 
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
32
33
  artifacts:
    paths:
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
34
      - public
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
35

Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
36
37
generate_pdfs:
  image: jtr0/latex-pandoc
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
38
  stage: pdfs
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
39
40
  only:
    - main
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
41
  script:
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
42
    - mkdir public/pdfs/
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
43
    - cp -r docs/imgs imgs
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
44
45
46
47
48
49
50
51
    # English pdfs
    - pandoc -N --template=eisvogel.latex --listings -V lang=en --from markdown --variable mainfont="DejaVuSerif" --variable sansfont="DejaVuSans" --variable monofont="DejaVuSansMono" --variable fontsize=12pt --variable version=2.0 pdf_metadata.md data/en/docs.pdf.md  --pdf-engine=xelatex --toc -o public/pdfs/en/eisvogel_template.pdf
    - pandoc -N --template=pandoc-scholar.latex --listings -V lang=en --from markdown --variable mainfont="DejaVuSerif" --variable sansfont="DejaVuSans" --variable monofont="DejaVuSansMono" --variable fontsize=12pt --variable version=2.0 pdf_metadata.md data/en/docs.pdf.md  --pdf-engine=xelatex --toc -o public/pdfs/en/pandoc-scholar_template.pdf
    - pandoc -N --template=default.latex --listings -V lang=en --from markdown --variable mainfont="DejaVuSerif" --variable sansfont="DejaVuSans" --variable monofont="DejaVuSansMono" --variable fontsize=12pt --variable version=2.0 pdf_metadata.md data/en/docs.pdf.md  --pdf-engine=xelatex --toc -o public/pdfs/en/default_template.pdf
    # Spanish pdfs
    - pandoc -N --template=eisvogel.latex --listings -V lang=en --from markdown --variable mainfont="DejaVuSerif" --variable sansfont="DejaVuSans" --variable monofont="DejaVuSansMono" --variable fontsize=12pt --variable version=2.0 pdf_metadata.md data/es/docs.pdf.md  --pdf-engine=xelatex --toc -o public/pdfs/es/eisvogel_template.pdf
    - pandoc -N --template=pandoc-scholar.latex --listings -V lang=en --from markdown --variable mainfont="DejaVuSerif" --variable sansfont="DejaVuSans" --variable monofont="DejaVuSansMono" --variable fontsize=12pt --variable version=2.0 pdf_metadata.md data/es/docs.pdf.md  --pdf-engine=xelatex --toc -o public/pdfs/es/pandoc-scholar_template.pdf
    - pandoc -N --template=default.latex --listings -V lang=en --from markdown --variable mainfont="DejaVuSerif" --variable sansfont="DejaVuSans" --variable monofont="DejaVuSansMono" --variable fontsize=12pt --variable version=2.0 pdf_metadata.md data/es/docs.pdf.md  --pdf-engine=xelatex --toc -o public/pdfs/es/default_template.pdf
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
52
53
  artifacts:
    paths:
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
54
55
      - public/pdfs/