From f1d2840ad0dccf41c61f512d5d8262d17aa26bf2 Mon Sep 17 00:00:00 2001 From: Benno Bielmeier Date: Sun, 22 Jan 2023 04:39:36 +0900 Subject: [PATCH] Add documentation --- README.adoc | 44 +++++++++++++++++++++++++++++++++++++++++++ examples/plantuml.yml | 24 +++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 examples/plantuml.yml diff --git a/README.adoc b/README.adoc index 854d073..18a015c 100644 --- a/README.adoc +++ b/README.adoc @@ -27,8 +27,52 @@ image:https://img.shields.io/maintenance/yes/{year}[Maintenance Status] Generation of PlantUML diagrams in a https://github.com/features/actions[GitHub Action] using the official https://hub.docker.com/r/plantuml/plantuml[plantuml/plantuml] Docker image. +== 🎚️ Inputs + +`format`:: + *Required.* + The format of the output images that will be generated in the workspace + [ + `png` (Default), `svg`, + `eps`, `eps:text`, `pdf`, + `vdx`, `xmi`, `scxml`, + `html`, + `txt`, `utxt`, + `latex`, `latex:nopreamble`, + `braille` + ]. + + See also: https://plantuml.com/command-line#458de91d76a8569c[PlantUML Command Line: Types of Output File]. +`pattern`:: + *Required.* + The pattern of files/dirs that will be processed. + It can include `\*`, `\**`, and `?`. + Example patterns are: + `\**.puml` (Default), + `doc/*.pu`. + + See also: https://plantuml.com/command-line#b0bd0c28426e3c8d[PlantUML Command Line: Wildcards]. + == 🖱️ Usage +.Minimal +[source,yml] +---- +include::examples/plantuml.yml[lines="14..15"] +---- + +.Customized +[source,yml] +---- +include::examples/plantuml.yml[lines="14..18"] +---- + +== 🛠️ Example + +..github/workflows/plantuml.yml +[source,yml] +---- +include::examples/plantuml.yml[] +---- + == 📃 Code of Conduct Please note that this project is release with the link:CODE_OF_CONDUCT.adoc[Contributor Covenant Code of Conduct]. diff --git a/examples/plantuml.yml b/examples/plantuml.yml new file mode 100644 index 0000000..58adcbb --- /dev/null +++ b/examples/plantuml.yml @@ -0,0 +1,24 @@ +name: Generate PlantUML Diagrams +on: + push: + paths: [ "**.puml" ] + branches: [ master ] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Generate PlantUML Diagrams + uses: rotaract/plantuml-action@v1 + with: + format: pdf + pattern: "docs/**.puml" + + - name: Upload Diagrams + uses: actions/upload-artifact@v3 + with: + name: diagrams + path: "**.pdf"