Skip to content
This repository has been archived by the owner on Feb 20, 2022. It is now read-only.

Commit

Permalink
Update readme and version to 0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Zhao authored and neenjaw committed Mar 31, 2021
1 parent 88c08bf commit f4be6dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Looking for suggestions/help in improving this action. If there is a feature you
## How to use

The idea is that this action is to be used within a workflow, not as a standalone action at this time.
OUTPUT_FILE_TYPE can be used to define the output file type, if you don't specify it it will default to png. You can override it to svg or pdf.

### Sample workflow with automated PR

Expand Down Expand Up @@ -55,6 +56,7 @@ jobs:
env:
HIDE_CODEBLOCKS: 1
ABSOLUTE_IMAGE_LINKS: 1
OUTPUT_FILE_TYPE: "svg"

- name: show changes
run: |
Expand Down Expand Up @@ -109,14 +111,14 @@ jobs:
echo ${{ steps.getfile.outputs.files }}
- name: compile mermaid
uses: neenjaw/[email protected].0
uses: neenjaw/[email protected].1
with:
files: ${{ steps.getfile.outputs.files }}
output: '.resources'
env:
HIDE_CODEBLOCKS: 1
ABSOLUTE_IMAGE_LINKS: 1
RENDER_SVG: 1
OUTPUT_FILE_TYPE: "svg"

- name: show changes
run: |
Expand Down
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
# Usage:
# > entrypoint.sh <output path> [<file1> [<file2> ...]]

# For *.mermaid or *.mmd files, it is compiled and a *.mermaid.png is created at the location
# For *.mermaid or *.mmd files, it is compiled and a *.mermaid.${output_file_type} is created at the location

# For *.md files:
# 1) finds all of the mermaid markup in the file
# 2) creates intermediate files in the output directory *.md.<n>.mermaid where n represents the nth block found
# 3) compile the mermaid to the directory *.md.<n>.mermaid.png
# 3) compile the mermaid to the directory *.md.<n>.mermaid.${output_file_type}
# 4) place a reference to the compiled image in the markdown

set -euo pipefail
Expand Down

0 comments on commit f4be6dc

Please sign in to comment.