Merge pull request #3862 from obsidian-tasks-group/dependabot/npm_and… #1283
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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@v6 | |
| - name: Install modules | |
| run: yarn | |
| - name: Run MarkdownSnippets | |
| run: | | |
| dotnet tool install --global MarkdownSnippets.Tool --version 27.0.2 | |
| 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@v8 | |
| 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 }}" |