Skip to content

test autor

test autor #4

Workflow file for this run

name: Convert Markdown to HTML and Deploy
on:
push:
branches:
- main # Trigger the workflow on push to the main branch
- dev
- feature/*
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install dependencies
run: npm install
- name: Install pandoc
run: sudo apt-get install -y pandoc
- name: Convert Markdown to HTML
run: |
mkdir -p _site
for file in *.md; do
pandoc "$file" -o "_site/${file%.md}.html"
done
- name: Deploy to GitHub Pages
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add _site
git commit -m 'Deploy static HTML files'
git push origin HEAD:${{ github.event.pull_request.head.ref }}