-
Notifications
You must be signed in to change notification settings - Fork 14
29 lines (27 loc) · 942 Bytes
/
pr.yml
File metadata and controls
29 lines (27 loc) · 942 Bytes
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
name: Convert Markdown to HTML
on: pull_request
jobs:
md2html: # make sure build/ci work properly
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npm run grunt
- name: check if commit & push is needed
id: check
run: |
git add -A \*.html &&
git diff-index --cached --exit-code HEAD -- ||
echo "name=need-to-commit::yes" >>$GITHUB_OUTPUT
- name: commit & push
if: steps.check.outputs.need-to-commit == 'yes'
run: |
git config user.name "${{github.actor}}" &&
git config user.email "${{github.actor}}@users.noreply.github.com" &&
git commit -m 'Convert Markdown to HTML' -- \*.html &&
git update-index --refresh &&
git diff-files --exit-code &&
git diff-index --cached --exit-code HEAD -- &&
git push