Skip to content

Commit

Permalink
e - add action to update markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
jonreid committed Dec 21, 2023
1 parent a5cba3d commit fea8018
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/updateMarkdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Update markdown snippets

on:
push:

jobs:
update-markdown-snippets:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Run MarkdownSnippets
run: |
dotnet tool install --global MarkdownSnippets.Tool
mdsnippets ${GITHUB_WORKSPACE}
shell: bash
- name: Push changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -m "d - Update markdown snippets" -a || echo "nothing to commit"
remote="https://${GITHUB_ACTOR}:${{secrets.GITHUB_TOKEN}}@github.com/${GITHUB_REPOSITORY}.git"
branch="${GITHUB_REF:11}"
git push "${remote}" ${branch} || echo "nothing to push"
shell: bash

4 changes: 4 additions & 0 deletions mdsnippets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"Convention": "InPlaceOverwrite",
"TocLevel": 5
}

0 comments on commit fea8018

Please sign in to comment.