Update blank.yml #7
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' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
- name: Push changes | |
run: | | |
git config --global user.email "actions@github.com" | |
git config --global user.name "GitHub Actions" | |
git add . | |
git commit -m "Auto-commit" | |
git push https://${{ secrets.GH_TOKEN }}@github.com/vedantcj/16039PEOdI.git HEAD:main |