-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (33 loc) · 1.06 KB
/
mdsnippets.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
name: Formatting and Snippets
on:
push:
jobs:
format_and_snippets:
runs-on: ubuntu-latest
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v4
- name: Set Git Author for Snippets Commit
run: |
git config --local user.name "github actions"
git config --local user.email "actions@github.com"
- name: ✏️ Create mdsnippets.json
run: |
echo '{
"$schema": "https://raw.githubusercontent.com/SimonCropp/MarkdownSnippets/master/schema.json",
"Convention": "InPlaceOverwrite",
"TocLevel": 5
}' > ${GITHUB_WORKSPACE}/mdsnippets.json
shell: bash
- name: ♻️ Run MarkdownSnippets
run: |
dotnet tool install --global MarkdownSnippets.Tool
mdsnippets ${GITHUB_WORKSPACE}
shell: bash
- name: ⬆️ Git Commit and Push
uses: github-actions-x/commit@v2.9
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
commit-message: ". d updated markdown snippets"
rebase: 'true'
push-branch: 'main'