-
-
Notifications
You must be signed in to change notification settings - Fork 3
36 lines (29 loc) · 1008 Bytes
/
on-push-do-docs.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
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: on-push-do-docs
on:
push:
jobs:
###################################################
# DOCS
###################################################
docs:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
- 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 "Docs changes" -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