From 15a55e5d3cf354355d8c3c43968bbb8f104ed44c Mon Sep 17 00:00:00 2001 From: KingOfDog Date: Tue, 12 Oct 2021 12:15:03 +0200 Subject: [PATCH] Update pipeline and markdown snippets --- .vscode/markdown.code-snippets | 47 +++++++++++++++++++++++++++++---- templates/markdown/.drone.yml | 48 ++++++++++++++++++++-------------- 2 files changed, 70 insertions(+), 25 deletions(-) diff --git a/.vscode/markdown.code-snippets b/.vscode/markdown.code-snippets index 2255b7d..f5c375f 100644 --- a/.vscode/markdown.code-snippets +++ b/.vscode/markdown.code-snippets @@ -1,22 +1,59 @@ { + "figure": { + "scope": "latex", + "prefix": "fig", + "body": [ + "\\begin{figure}[h]", + " \\centering", + " \\fbox{\\includegraphics[width=1\\textwidth]{resources/$1}}", + " \\caption{$2}", + " \\label{fig:$3}", + " \\source{$4}", + "\\end{figure}" + ] + }, + "code listing": { + "scope": "latex", + "prefix": "lst", + "body": [ + "\\begin{code}", + " \\inputminted{${1:language}}{resources/${2:source file}}", + " \\label{lst:$3}", + " \\captionof{listing}{$4}", + " \\source{$5}", + "\\end{code}" + ] + }, + "table": { + "scope": "latex", + "prefix": "tab", + "body": [ + "\\begin{table}[h]", + " \\centering", + " \\begin{tabularx}{\\textwidth}{$1}", + " $5", + " \\end{tabularx}", + " \\caption{$2}", + " \\label{tab:$3}", + " \\source{$4}", + "\\end{table}" + ] + }, "online im Internet": { "scope": "markdown", "prefix": "oii", "body": "online im Internet" }, - "autocite": { "scope": "markdown", - "prefix": "ac", - "body": "[vgl. @${1:bibentry}, ${2:page}]" + "prefix": "ac", + "body": "[vgl. @${1:bibentry}, ${2:page}]" }, - "label": { "scope": "markdown", "prefix": "lbl", "body": "{#${1:type}:${2:id}}" }, - "reference": { "scope": "markdown", "prefix": "ref", diff --git a/templates/markdown/.drone.yml b/templates/markdown/.drone.yml index 43dad0e..8eafbd5 100644 --- a/templates/markdown/.drone.yml +++ b/templates/markdown/.drone.yml @@ -24,23 +24,31 @@ type: docker name: build steps: -- name: pandoc - image: fastexitlane/pandoc-latex:latest - commands: - - ./build.sh pandoc - - ci_commit_sha_short=`git rev-parse --short $CI_COMMIT_SHA` -- name: gitea_release - image: plugins/gitea-release - settings: - api_key: - from_secret: gitea_token - base_url: https://git.kingofdog.de - files: - - main.pdf - when: - event: - - tag - -trigger: - branch: - - main \ No newline at end of file + - name: pandoc + image: fastexitlane/pandoc-latex:latest + commands: + - ./build.sh pandoc + - ci_commit_sha_short=`git rev-parse --short $CI_COMMIT_SHA` + - mv out/main.pdf "$(date +"%F-%H-%M")_$DRONE_REPO_NAME.pdf" + - name: upload + image: plugins/s3 + settings: + bucket: praxisarbeit-artifacts + access_key: + from_secret: minio_access_key + secret_key: + from_secret: minio_secret_key + source: ./*.pdf + region: eu-dogland + target: /version-${DRONE_BRANCH}-${DRONE_BUILD_NUMBER} + path_style: true + endpoint: https://minio.kingofdog.de + - name: release + image: plugins/gitea-release + settings: + api_key: + from_secret: gitea_token + base_url: https://git.kingofdog.de + files: ./*.pdf + when: + event: tag \ No newline at end of file