Skip to content

Github Action converting a HTML file to Markdown

License

Notifications You must be signed in to change notification settings

rknj/html2markdown

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Convert a HTML page to Markdown

Based on turndown NPM package

Usage

name: Convert report
on:
  - pull_request

jobs:
  get-unused-dependencies:
    runs-on: ubuntu-latest
    steps:
      - name: Look for unused librairies
        run: |
          mvn dependency:analyze-report --no-transfer-progress
      - name: Convert HTML to Markdown
        id: html2markdown
        if: always()
        uses: rknj/[email protected]
        with:
          html-file: "target/dependency-analysis.html"
      - name: Create issue with report
        if: always()
        uses: dacbd/create-issue-action@main
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          title: Maven dependency reports (unused dependencies)
          body: |
            ${{ steps.html2markdown.outputs.markdown-content }}
          assignees: rknj
      - name: Show content of generated markdown file
        if: always()
        run: |
          cat ${{ steps.html2markdown.outputs.markdown-file }}

Build

Build the typescript and package it for distribution

$ npm run all

License

This project is released under the MIT License.