diff --git a/.github/workflows/markdown-to-html.yml b/.github/workflows/markdown-to-html.yml index c719010..103a747 100644 --- a/.github/workflows/markdown-to-html.yml +++ b/.github/workflows/markdown-to-html.yml @@ -1,33 +1,43 @@ +# This is a basic workflow to help you get started with Actions + name: Convert Markdown to HTML +# Controls when the workflow will run on: + # Triggers the workflow on push or pull request events but only for the "main" branch push: - branches: - - main # Change this to your default branch if it's not 'main' + branches: [ "main" ] + pull_request: + branches: [ "main" ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: +# A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: + # This workflow contains a single job called "build" build: + # The type of runner that the job will run on runs-on: ubuntu-latest + # Steps represent a sequence of tasks that will be executed as part of the job steps: + # Checks out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Checkout repository - uses: actions/checkout@v2 - - - name: Install Pandoc - run: | - sudo apt-get update - sudo apt-get install -y pandoc + uses: actions/checkout@v4 - - name: Convert README.md to HTML - run: | - pandoc README.md -o index.html + # Converts Markdown to HTML + - name: Convert Markdown to HTML + uses: jaywcjlove/markdown-to-html-cli@main + with: + source: README.md + output: index.html + github-corners: https://github.com/jaywcjlove/markdown-to-html-cli + favicon: data:image/svg+xml,🌐 - - name: Commit and push changes - run: | - git config --local user.name "github-actions" - git config --local user.email "github-actions@github.com" - git add index.html - git commit -m "Update index.html from README.md" || echo "No changes to commit" - git push - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # Optionally, you can add a step to upload the generated HTML file as an artifact + - name: Upload HTML artifact + uses: actions/upload-artifact@v3 + with: + name: index.html + path: index.html