File tree Expand file tree Collapse file tree 2 files changed +33
-36
lines changed
Expand file tree Collapse file tree 2 files changed +33
-36
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Convert MarkDown To Html
2+
3+ on :
4+ push :
5+ branches : [ "master" ]
6+
7+ jobs :
8+ build :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Checkout repository
12+ uses : actions/checkout@v3
13+
14+ - name : Set up Python
15+ uses : actions/setup-python@v4
16+ with :
17+ python-version : ' 3.x'
18+
19+ - name : Install markdown package
20+ run : pip install markdown
21+
22+ - name : Convert README.md to HTML
23+ run : |
24+ mkdir -p page
25+ python -c "import markdown, pathlib; html = markdown.markdown(pathlib.Path('README.md').read_text()); pathlib.Path('page/index.html').write_text(html)"
26+
27+ - name : Commit and push index.html
28+ run : |
29+ git config --global user.name 'github-actions[bot]'
30+ git config --global user.email 'github-actions[bot]@users.noreply.github.com'
31+ git add page/index.html
32+ git commit -m 'Auto-generate index.html from README.md' || echo 'No changes to commit'
33+ git push
You can’t perform that action at this time.
0 commit comments