Update markdown-to-html.yml #8
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: Convert Markdown to HTML | |
on: | |
push: | |
branches: | |
- main # Change this to your default branch if it's not 'main' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install Pandoc | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y pandoc | |
- name: Convert README.md to HTML | |
run: | | |
pandoc README.md -o index.html | |
- name: Commit and push changes | |
run: | | |
git config --local user.name "github-actions" | |
git config --local user.email "[email protected]" | |
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 }} |