-
Notifications
You must be signed in to change notification settings - Fork 54
49 lines (41 loc) · 1.1 KB
/
markdown-to-html.yml
File metadata and controls
49 lines (41 loc) · 1.1 KB
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
43
44
45
46
47
48
49
name: Convert Markdown to HTML
on:
push:
paths:
- 'README.md'
- 'README_en.md'
- 'CONTRIBUTING.md'
- 'markdown_to_html.py'
workflow_dispatch:
jobs:
convert-markdown:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install markdown
- name: Create docs directory
run: mkdir -p docs
- name: Run markdown to HTML conversion
run: python markdown_to_html.py
- name: Commit and push changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add docs/
if [[ -n $(git status --porcelain docs/) ]]; then
git commit -m "Auto-update HTML files from Markdown [skip ci]"
git push
else
echo "No changes to commit"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}