-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 1 KB
/
md-html-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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.email "belindabrownr04@gmail.com"
git config --global user.name "brown9804"
git add _site
git commit -m 'Deploy static HTML files'
git push origin HEAD:${{ github.ref }}