diff --git a/.github/workflows/render-samples.yml b/.github/workflows/render-samples.yml index 5b66247..da0244a 100644 --- a/.github/workflows/render-samples.yml +++ b/.github/workflows/render-samples.yml @@ -25,6 +25,7 @@ jobs: output-pdf: sample1.pdf output-docx: sample1.docx output-tex: sample1.tex + output-html: sample1.html - name: Run the action on sample2 uses: ./ @@ -32,15 +33,13 @@ jobs: input-md: sample2.md output-pdf: sample2.pdf output-docx: sample2.docx - output-tex: sample2.tex + output-html: sample2.html - name: Run the action on sample3 uses: ./ with: input-md: sample3.md output-pdf: sample3.pdf - output-docx: sample3.docx - output-tex: sample3.tex - name: Upload Artifact uses: actions/upload-artifact@master @@ -50,6 +49,7 @@ jobs: sample*.docx sample*.tex sample*.pdf + sample*.html - name: Check in latest render uses: stefanzweifel/git-auto-commit-action@v4 diff --git a/action.yml b/action.yml index 5efcd53..d726541 100644 --- a/action.yml +++ b/action.yml @@ -6,7 +6,8 @@ inputs: required: true output-pdf: description: 'The name of the rendered PDF file' - required: true + output-html: + description: 'The name of the rendered HTML file' output-docx: description: 'The name of the rendered DOCX file' output-tex: @@ -20,31 +21,9 @@ runs: shell: sh - run: > /usr/bin/build.sh - --puppeteer - --pdf=${{ inputs.output-pdf }} - ${{ inputs.input-md }} - shell: sh - env: - MERMAID_FILTER_THEME: "forest" - MERMAID_FILTER_FORMAT: "pdf" - - run: > - /usr/bin/build.sh - --puppeteer - --latex=${{ inputs.output-tex }} - ${{ inputs.input-md }} - shell: sh - if: ${{ inputs.output-tex }} - env: - MERMAID_FILTER_THEME: "forest" - MERMAID_FILTER_FORMAT: "pdf" - - run: > - /usr/bin/build.sh - --puppeteer - --pdf=${{ inputs.output-pdf }} - --docx=${{ inputs.output-docx }} + $( [ -n "${{ inputs.output-pdf }}" ] && echo --pdf=${{ inputs.output-pdf }} ) + $( [ -n "${{ inputs.output-html }}" ] && echo --html=${{ inputs.output-html }} ) + $( [ -n "${{ inputs.output-docx }}" ] && echo --docx=${{ inputs.output-docx }} ) + $( [ -n "${{ inputs.output-tex }}" ] && echo --latex=${{ inputs.output-tex }} ) ${{ inputs.input-md }} shell: sh - if: ${{ inputs.output-docx }} - env: - MERMAID_FILTER_THEME: "forest" - MERMAID_FILTER_FORMAT: "pdf"