Merge branch '42-provide-own-docker-image-for-spellchecking' into 'master'

Adapt spellchecking for markdown

Closes #42 and #41

See merge request fastexitlane/latex-boilerplate!20
This commit is contained in:
Dominik Becker 2020-05-24 14:36:15 +00:00
commit ae4c132d80
4 changed files with 77 additions and 49 deletions

View File

@ -1,47 +0,0 @@
stages:
- test
- build
latexmk:
image: fastexitlane/pandoc-latex:latest
stage: build
artifacts:
paths:
- main*.pdf
expire_in: 2d
script:
- latexmk main.tex
- ci_commit_sha_short=`git rev-parse --short $CI_COMMIT_SHA`
- mv main.pdf main@$ci_commit_sha_short.pdf
# pandoc_latexmk:
# image: fastexitlane/pandoc-latex:latest
# stage: build
# artifacts:
# paths:
# - main*.pdf
# expire_in: 2d
# script:
# - pandoc --filter pandoc-crossref --filter pandoc-citeproc -M cref=true --top-level-division=chapter --bibliography library/library.bib --biblatex -o chapter/out.tex chapter/*.md
# - latexmk main.tex
# - ci_commit_sha_short=`git rev-parse --short $CI_COMMIT_SHA`
# - mv main.pdf main@$ci_commit_sha_short.pdf
hunspell_chapters:
image: tmaier/hunspell:latest
stage: test
script:
- export HUNSPELL_FINDINGS=`for filename in chapter/*.tex; do hunspell -l -d de_DE_neu,en_US -p ./.hunspellignore -t $filename; done | sort | uniq`
- echo $HUNSPELL_FINDINGS
- test "$HUNSPELL_FINDINGS" == ""
allow_failure: true
hunspell_appendix:
image: tmaier/hunspell:latest
stage: test
script:
- export HUNSPELL_FINDINGS=`for filename in appendix/*.tex; do hunspell -l -d de_DE_neu,en_US -p ./.hunspellignore -t $filename; done | sort | uniq`
- echo $HUNSPELL_FINDINGS
- test "$HUNSPELL_FINDINGS" == ""
allow_failure: true

View File

@ -25,12 +25,14 @@ git pull boilerplate master
git remote remove boilerplate
```
In order to use the preconfigured continuous integration, make sure your GitLab CI meets the [Basic Requirements](https://gitlab.com/fastexitlane/latex-boilerplate/wikis/GitLab-CI#basic-requirements).
In order to use the preconfigured CI / CD pipeline for building PDFs, copy either `latex.gitlab-ci.yml` or `markdown.gitlab-ci.yml` to `.gitlab-ci`, depending on which workflow you want to use.
On GitLab.com, this will use Dockerized builds by default.
If you want to use the workflow on own hardware, make sure your GitLab CI meets the [Basic Requirements](https://gitlab.com/fastexitlane/latex-boilerplate/wikis/GitLab-CI#basic-requirements).
If you know what you're doing, simply start adding your content files in `chapter/` as LaTex `\chapter`s and `\input` them into `main.tex`.
If you do not know what you're doing or get into trouble - or want to use the **Markdown Workflow**, you may want to consider the [wiki](https://gitlab.com/fastexitlane/latex-boilerplate/wikis/home) ;-)
## Docker Images
If you need a docker image to build your documents, head over to [pandoc-latex](https://github.com/fastexitlane/pandoc-latex) ([DockerHub](https://hub.docker.com/r/fastexitlane/pandoc-latex)).
If you need a Docker image to build your documents, head over to [pandoc-latex](https://github.com/fastexitlane/pandoc-latex) ([DockerHub](https://hub.docker.com/r/fastexitlane/pandoc-latex)).
Also, there's a prebuilt Docker image for spellchecking using Hunspell - head over to [docker-hunspell](https://github.com/fastexitlane/docker-hunspell).

35
latex.gitlab-ci.yml Normal file
View File

@ -0,0 +1,35 @@
stages:
- test
- build
latexmk:
image: fastexitlane/pandoc-latex:latest
stage: build
artifacts:
paths:
- main*.pdf
expire_in: 2d
script:
- latexmk main.tex
- ci_commit_sha_short=`git rev-parse --short $CI_COMMIT_SHA`
- mv main.pdf main@$ci_commit_sha_short.pdf
hunspell_chapters:
image: fastexitlane/hunspell:latest
stage: test
script:
- export HUNSPELL_FINDINGS=`for filename in chapter/*.tex; do hunspell -l -d de_DE_frami,en_US -p ./.hunspellignore -t $filename; done | sort | uniq`
- echo $HUNSPELL_FINDINGS
- test "$HUNSPELL_FINDINGS" == ""
allow_failure: true
hunspell_appendix:
image: fastexitlane/hunspell:latest
stage: test
script:
- export HUNSPELL_FINDINGS=`for filename in appendix/*.tex; do hunspell -l -d de_DE_frami,en_US -p ./.hunspellignore -t $filename; done | sort | uniq`
- echo $HUNSPELL_FINDINGS
- test "$HUNSPELL_FINDINGS" == ""
allow_failure: true

38
markdown.gitlab-ci.yml Normal file
View File

@ -0,0 +1,38 @@
stages:
- test
- build
pandoc_latexmk:
image: fastexitlane/pandoc-latex:latest
stage: build
artifacts:
paths:
- main*.pdf
expire_in: 2d
script:
- pandoc --filter pandoc-crossref --filter pandoc-citeproc -M cref=true --top-level-division=chapter --bibliography library/library.bib --biblatex -o chapter/out.tex chapter/*.md
- latexmk main.tex
- ci_commit_sha_short=`git rev-parse --short $CI_COMMIT_SHA`
- mv main.pdf main@$ci_commit_sha_short.pdf
hunspell_chapters:
image: fastexitlane/hunspell:latest
stage: test
script:
- export HUNSPELL_FINDINGS=`for filename in chapter/*.md; do hunspell -l -d de_DE_frami,en_US -p ./.hunspellignore $filename; done | sort | uniq`
- echo $HUNSPELL_FINDINGS
- test "$HUNSPELL_FINDINGS" == ""
allow_failure: true
hunspell_appendix:
image: fastexitlane/hunspell:latest
stage: test
script:
- export HUNSPELL_FINDINGS=`for filename in appendix/*.tex; do hunspell -l -d de_DE_frami,en_US -p ./.hunspellignore -t $filename; done | sort | uniq`
- echo $HUNSPELL_FINDINGS
- test "$HUNSPELL_FINDINGS" == ""
allow_failure: true