diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 09616cb..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -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 diff --git a/README.md b/README.md index d3e2af4..9f090f9 100644 --- a/README.md +++ b/README.md @@ -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). \ No newline at end of file diff --git a/latex.gitlab-ci.yml b/latex.gitlab-ci.yml new file mode 100644 index 0000000..72ed292 --- /dev/null +++ b/latex.gitlab-ci.yml @@ -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 diff --git a/markdown.gitlab-ci.yml b/markdown.gitlab-ci.yml new file mode 100644 index 0000000..68de987 --- /dev/null +++ b/markdown.gitlab-ci.yml @@ -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 + \ No newline at end of file