Update blank.yml #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Render Markdown Files | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
render_markdown: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install pandoc | |
run: sudo apt-get install pandoc -y | |
- name: Create rendered_html directory | |
run: mkdir -p rendered_html | |
- name: Render Markdown files | |
run: | | |
for file in *.md; do | |
pandoc "$file" -o "rendered_html/${file%.md}.html" | |
done | |
- name: Commit rendered HTML files | |
uses: EndBug/add-and-commit@v7 | |
with: | |
author_name: GitHub Actions | |
author_email: actions@github.com | |
message: 'Render Markdown to HTML' | |
add: 'rendered_html/*.html' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_PAT }} |