Skip to content

Add workflow for linting and markdown-link-check #13

Add workflow for linting and markdown-link-check

Add workflow for linting and markdown-link-check #13

Workflow file for this run

name: "Link check for internal links"
on:
push:
branches: ["main"]
paths:
- "**.md"
pull_request:
branches: ["main"]
paths:
- "**.md"
jobs:
link-checker:
name: Check internal and external links in markdown files
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
with:
ref: ${{ github.ref }}
fetch-depth: 0
- name: Set Node version
id: versions
shell: bash
run: |
NODE_VERSION=$(jq -r '.engines.node' package.json)
echo "NODE_VERSION=$NODE_VERSION" >> $GITHUB_OUTPUT
- name: Setup node.js
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: ${{ steps.versions.outputs.NODE_VERSION }}
- name: Install dependencies
run: npm install
- name: Run markdown link check
run: npm run markdown-link-check -- -q -o