Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ concurrency:
group: "pages"
cancel-in-progress: true

defaults:
run:
shell: bash

jobs:
# Build job
build:
Expand All @@ -31,6 +35,22 @@ jobs:
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v2

- name: Count number of plantuml files
id: count-plantuml
run: |
count=$(find docs/ -name \*.puml | wc -l)
echo "There are $count plantuml files"
echo "::set-output name=num::$count"
- name: Install PlantUML on demand
if: steps.count-plantuml.outputs.num > 0
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y plantuml
- name: Build PlantUML images
if: steps.count-plantuml.outputs.num > 0
run: make -C docs build-uml-svg

- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
Expand Down
17 changes: 16 additions & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
BUNDLER=bundler
HOST=127.0.0.1

PLANTUML_SRC=$(shell find -name \*.puml ! -path ./_site/\*)
PLANTUML_DST_SVG=${PLANTUML_SRC:%.puml=%.svg}

.PHONY: all
all: help

.PHONY: help watch build install
.PHONY: help watch build install build-uml-svg

help:
@echo "Make tragets supported:"
Expand All @@ -23,3 +26,15 @@ watch:
install:
${BUNDLER} install

build-uml-svg:
ifeq ($(strip ${PLANTUML_SRC}),)
@echo 'No plantuml files were found. Skipping.'
else
${MAKE} ${PLANTUML_DST_SVG}
endif

%.svg: %.puml
plantuml -tsvg $<

%.png: %.puml
plantuml -tpng $<