From f1963ac5876aa5df97a5b9ee7795bc0fbc26aaed Mon Sep 17 00:00:00 2001 From: Leon Fuss Date: Fri, 19 Apr 2024 17:46:42 +0200 Subject: [PATCH] add mermaid to ci --- .github/workflows/publish.yml | 24 ++++++++++++++---------- Makefile | 4 +++- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 70a7a83..6b68018 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,19 +6,23 @@ on: jobs: publish: runs-on: ubuntu-latest + env: + MDBOOK_VERSION: "0.4.37" + MDBOOK_MERMAID_VERSION: "0.13.0" steps: - name: Checkout uses: actions/checkout@v3 - - name: Install Racket - uses: Bogdanp/setup-racket@v1.7 - with: - architecture: "x64" - distribution: "full" - variant: "CS" - version: "stable" - - name: Create Documentation - run: make doc + - name: Install mdbook + run: | + mkdir ~/tools + curl -L https://github.com/rust-lang/mdBook/releases/download/v$MDBOOK_VERSION/mdbook-v$MDBOOK_VERSION-x86_64-unknown-linux-gnu.tar.gz | tar xz -C ~/tools + curl -L https://github.com/badboy/mdbook-mermaid/releases/download/v$MDBOOK_MERMAID_VERSION/mdbook-mermaid-v$MDBOOK_MERMAID_VERSION-x86_64-unknown-linux-gnu.tar.gz | tar xz -C ~/tools + echo ~/tools >> $GITHUB_PATH + - name: Build + run: | + cd docs + mdbook build - uses: JamesIves/github-pages-deploy-action@4.1.7 with: branch: gh-pages - folder: docs/book \ No newline at end of file + folder: docs/book diff --git a/Makefile b/Makefile index ea83bdc..c290988 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,6 @@ doc: + test -d bin || mkdir bin test -f bin/mdbook || curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.27/mdbook-v0.4.27-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin - bin/mdbook build docs --open \ No newline at end of file + test -f bin/mdbook-mermaid || curl -sSL https://github.com/badboy/mdbook-mermaid/releases/download/v0.13.0/mdbook-mermaid-v0.13.0-x86_64-unknown-linux-gnu.tar.gz | tar -xz -C bin + bin/mdbook build docs --open