Skip to content

Documentation

Documentation #17

name: "Documentation"
on:
push:
branches:
- "main"
paths:
- "**.md"
pull_request:
branches:
- "main"
paths:
- "**.md"
schedule:
- cron: "0 0 */2 * *"
workflow_dispatch:
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
linter:
name: "Linter"
if: "${{ github.event_name == 'push' || github.event_name == 'pull_request' }}"
runs-on: "ubuntu-latest"
steps:
- name: "Set up workspace"
uses: "actions/checkout@v4.1.1"
- name: "Run linter"
uses: "avto-dev/markdown-lint@v1.5.0"
with:
args: "**.md"
link-checker:
name: "Link checker"
runs-on: "ubuntu-latest"
env:
MARKDOWN_LINK_CHECK_CONFIGURATION_FILE: ".markdownlc.json"
steps:
- name: "Set up workspace (applicable to integration events)"
if: "${{ github.event_name == 'push' || github.event_name == 'pull_request' }}"
uses: "actions/checkout@v4.1.1"
- name: "Set up workspace (applicable to manual or scheduled events)"
if: "${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}"
uses: "actions/checkout@v4.1.1"
with:
fetch-depth: 0
- name: "Run link checker (applicable to integration events)"
if: "${{ github.event_name == 'push' || github.event_name == 'pull_request' }}"
uses: "gaurav-nelson/github-action-markdown-link-check@1.0.15"
with:
base-branch: "main"
check-modified-files-only: "yes"
use-quiet-mode: "yes"
config-file: "${{ env.MARKDOWN_LINK_CHECK_CONFIGURATION_FILE }}"
- name: "Run link checker (applicable to manual or scheduled events)"
if: "${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}"
uses: "gaurav-nelson/github-action-markdown-link-check@1.0.15"
with:
base-branch: "main"
use-quiet-mode: "yes"
config-file: "${{ env.MARKDOWN_LINK_CHECK_CONFIGURATION_FILE }}"