From 92a171616a8e89f35e20243d8d23d8a52c77ecf6 Mon Sep 17 00:00:00 2001 From: Fredrik Borch Lynghaug Date: Wed, 8 Apr 2026 16:35:50 +0200 Subject: [PATCH] markdown-konvertering --- woodpecker.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 woodpecker.yml diff --git a/woodpecker.yml b/woodpecker.yml new file mode 100644 index 0000000..1e03f37 --- /dev/null +++ b/woodpecker.yml @@ -0,0 +1,12 @@ +steps: + - name: convert-markdown-to-pdf + image: fish + commands: + - mkdir -p dist + - curl -sLo icon.svg https://klingenbergbygg.no/icon-normalized.svg + - for md in (find . -name "*.md" ! -path "./.git/*"); pandoc -f gfm+tex_math_dollars -t pdf -o "dist/$(basename $md .md).pdf" --pdf-engine=typst --template=stil.typ $md; end + - "curl --silent --fail --header \"Authorization: token $GITEA_PACKAGE_TOKEN\" \"$GITEA_SERVER/api/v1/repos/$CI_REPO/releases/tags/$CI_COMMIT_TAG\" | jq -r '.id' > ./release_id" + - "for pdf in (find dist -name '*.pdf'); curl --silent --show-error --fail --header \"Authorization: token $GITEA_PACKAGE_TOKEN\" --form \"attachment=@$pdf\" \"$GITEA_SERVER/api/v1/repos/$CI_REPO/releases/\"(cat ./release_id)\"/assets?name=\"(basename $pdf); end" + when: + - event: [tag] + branch: main \ No newline at end of file