Skip to content

Commit 3993b69

Browse files
committed
. d Use mdsnippets to update table of contents
1 parent d8e357b commit 3993b69

3 files changed

Lines changed: 32 additions & 7 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Update markdown snippets
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
update-markdown-snippets:
8+
runs-on: windows-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- name: Run MarkdownSnippets
12+
run: |
13+
dotnet tool install --global MarkdownSnippets.Tool
14+
mdsnippets ${GITHUB_WORKSPACE}
15+
16+
shell: bash
17+
- name: Push changes
18+
run: |
19+
git config --local user.email "action@github.com"
20+
git config --local user.name "GitHub Action"
21+
git commit -m "d - Update markdown snippets" -a || echo "nothing to commit"
22+
remote="https://${GITHUB_ACTOR}:${{secrets.GITHUB_TOKEN}}@github.com/${GITHUB_REPOSITORY}.git"
23+
branch="${GITHUB_REF:11}"
24+
git push "${remote}" ${branch} || echo "nothing to push"
25+
shell: bash
26+

README.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,8 @@ TCR stands for "test && commit || revert," a challenging and fun development wor
88

99
**Note:** This works for Xcode projects and workspaces. It currently doesn't work for Swift packages.
1010

11-
## Contents
12-
13-
- [What It Does](#what-it-does)
14-
- [Temporary Bypass](#temporary-bypass)
15-
- [TDD Mode](#tdd-mode)
16-
- [How to Set It Up](#how-to-set-it-up)
17-
- [References](#references)
11+
<!-- toc -->
12+
<!-- endToc -->
1813

1914
## What It Does
2015

mdsnippets.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"Convention": "InPlaceOverwrite",
3+
"TocLevel": 5
4+
}

0 commit comments

Comments
 (0)