diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 577f5d4a..e61eef61 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -34,6 +34,8 @@ jobs: uses: actions/configure-pages@v2 - name: Install Bikeshed run: pip3 install bikeshed && bikeshed update + - name: Install Mermaid + run: npm install -g @mermaid-js/mermaid-cli - name: Build specs run: make -C spec publish && make -C spec/v2 publish && make -C spec/faq publish - name: Upload artifact diff --git a/.gitignore b/.gitignore index 83243924..5a563069 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ index.html upload/ *.svg +.DS_Store diff --git a/spec/release.sh b/spec/release.sh index 2faa3bfe..5a09cd87 100644 --- a/spec/release.sh +++ b/spec/release.sh @@ -2,6 +2,7 @@ cd spec/v2 pip3 install bikeshed && bikeshed update +npm list -g @mermaid-js/mermaid-cli || npm install -g @mermaid-js/mermaid-cli mv header.include header.include_temp mv header.include_release header.include rm index.html diff --git a/spec/v2/Makefile b/spec/v2/Makefile index 902c4ffc..6f9810b8 100644 --- a/spec/v2/Makefile +++ b/spec/v2/Makefile @@ -1,6 +1,7 @@ +# Assumes bikeshed is installed (pip3 install bikeshed) +# Assumes mmdc is installed (npm install -g @mermaid-js/mermaid-cli) DIAGRAMS := $(patsubst %.mmd,%.svg,$(wildcard diagrams/*.mmd)) OUTDIR := ../../upload/v2 -MMDC := mmdc STATUS ?= "" all: index.html @@ -18,14 +19,11 @@ index.html: index.bs $(DIAGRAMS) bikeshed spec $< $@ --md-text-macro="$(STATUS)" %.svg: %.mmd $(MMDC) - $(MMDC) -i $< -o $@ + mmdc -i $< -o $@ serve: $(DIAGRAMS) bikeshed serve index.bs -$(MMDC): - npm install -g @mermaid-js/mermaid-cli - pull-metadata: curl -o computed-metadata.include https://raw.githubusercontent.com/wbcsd/tr/main/data-exchange-protocol/computed-metadata.include