uni-ausarbeitung/templates/markdown/.drone.yml

74 lines
2.1 KiB
YAML
Raw Normal View History

2021-05-16 20:01:36 +00:00
kind: pipeline
type: docker
name: build
steps:
2021-10-12 10:15:03 +00:00
- name: pandoc
pull: always
image: kingofdog/pandoc-latex:latest
2021-10-12 10:15:03 +00:00
commands:
- ./build.sh pandoc
- name: prepare-files
image: kingofdog/pandoc-latex:latest
commands:
2021-10-12 10:15:03 +00:00
- ci_commit_sha_short=`git rev-parse --short $CI_COMMIT_SHA`
- cp out/main.pdf "$(date +"%F-%H-%M")_${DRONE_REPO_NAME}_${DRONE_BUILD_NUMBER}.pdf"
depends_on:
- pandoc
- name: log
image: kingofdog/pandoc-latex:latest
commands:
- cat out/main.log
- ls -l out
- ls -l appendix/generated
depends_on:
- pandoc
2021-10-12 10:15:03 +00:00
- name: upload
image: plugins/s3
settings:
bucket:
from_secret: minio_bucket
2021-10-12 10:15:03 +00:00
access_key:
from_secret: minio_access_key
secret_key:
from_secret: minio_secret_key
source: ./*.pdf
region: eu-dogland
target: /
2021-10-12 10:15:03 +00:00
path_style: true
endpoint: https://minio.kingofdog.de
depends_on:
- prepare-files
2021-10-12 10:15:03 +00:00
- name: release
image: plugins/gitea-release
settings:
api_key:
from_secret: gitea_token
base_url: https://git.kingofdog.de
files: ./*.pdf
when:
event: tag
depends_on:
- prepare-files
- name: hunspell_chapters
image: kingofdog/hunspell:latest
failure: ignore
commands:
- sed -i -E 's/\\acf?s?p?\{([^}]+)\}/\1/g' chapter/out.tex
- sed -i -E 's/\\\w+\{[^}]+\}//g' chapter/out.tex
- export HUNSPELL_FINDINGS="`hunspell -l -i UTF-8 -d de_DE_frami,en_US -p ./.hunspellignore chapter/out.tex | sort | uniq`"
- export HUNSPELL_FINDINGS_COUNT=`echo $HUNSPELL_FINDINGS | wc -w`
- echo "Found $HUNSPELL_FINDINGS_COUNT different incorrect words."
- '[ -z "$HUNSPELL_FINDINGS" ] && exit 0 || exit 1'
depends_on:
- pandoc
- name: hunspell_appendix
image: kingofdog/hunspell:latest
failure: ignore
commands:
- 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
- '[ -z "$HUNSPELL_FINDINGS" ] && exit 0 || exit 1'
depends_on:
- pandoc