.gitlab-ci.yml 1.92 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 data
14
15
16
    - mkdir data/en/
    - 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:
27
28
    - mkdocs build -f config/en/mkdocs.yml --verbose --site-dir public/en/ --no-directory-urls 
    - mkdocs build -f config/es/mkdocs.yml --verbose --site-dir public/es/ --no-directory-urls 
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
29
30
31
32
  artifacts:
    paths:
      - public

Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
33
34
generate_pdfs:
  image: jtr0/latex-pandoc
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
35
  stage: pdfs
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
36
37
  only:
    - main
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
38
  script:
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
39
    - mkdir public/pdfs/
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
40
    - cp -r docs/imgs imgs
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
41
42
43
    - 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/docs.pdf.md  --pdf-engine=xelatex --toc -o public/pdfs/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/docs.pdf.md  --pdf-engine=xelatex --toc -o public/pdfs/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/docs.pdf.md  --pdf-engine=xelatex --toc -o public/pdfs/default_template.pdf
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
44
45
  artifacts:
    paths:
Jorge Tardío Rubio's avatar
Jorge Tardío Rubio committed
46
47
      - public/pdfs/