Skip to content

chore: No point publishing the docs if the release was cancelled #319

chore: No point publishing the docs if the release was cancelled

chore: No point publishing the docs if the release was cancelled #319

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@v6
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 }}"