generated from obsidianmd/obsidian-sample-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 239
44 lines (39 loc) · 1.46 KB
/
update-docs-markdown.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
38
39
40
41
42
43
44
name: update-docs-markdown
on:
# Obtained fom https://stackoverflow.com/a/61565445/104370
push:
branches:
- main
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install modules
run: yarn
- name: Run MarkdownSnippets
run: |
dotnet tool install --global MarkdownSnippets.Tool
mdsnippets ${GITHUB_WORKSPACE} && yarn run lint:markdown && git add --renormalize .
git commit -m "docs/contrib: Update snippets and examples in markdown" -a || echo "nothing to commit"
shell: bash
# ----------------------------------------------------------------------------------
# Finalisation
# ----------------------------------------------------------------------------------
# Reference: https://github.com/marketplace/actions/create-pull-request
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v7
with:
title: "docs/contrib: Update snippets and examples in markdown"
branch: create-pull-request/${{ github.workflow }}
labels: |
scope: documentation
type: automated update
- name: Show Pull Request
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"