Skip to content

Migrated from markdown-lint-checker to lychee action #53

Migrated from markdown-lint-checker to lychee action

Migrated from markdown-lint-checker to lychee action #53

Workflow file for this run

name: Markdown
on:
workflow_dispatch:
pull_request:
paths:
- '.github/workflows/markdown.yml'
- '.github/markdownlint.json'
- '.github/markdownlint.jsonc'
- '**/*.md'
- '!.github/workflows/nightly.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
lint:
name: Lint Markdown Files
runs-on: ubuntu-latest
permissions:
contents: write
packages: read
actions: read
steps:
- name: Harden Runner
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit
- name: Configure git settings
run: git config --global core.autocrlf false
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
submodules: true
fetch-depth: 0
- name: Register Markdownlint Warning Matcher
run: echo "::add-matcher::.github/markdownlint.json"
- name: Setup Node
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
node-version-file: package.json
registry-url: https://npm.pkg.github.com
package-manager-cache: false
- name: Install dependencies
env:
GITHUB_TOKEN: ${{ github.token }}
NODE_OPTIONS: --max-old-space-size=8192
run: npm ci
- name: Lint Markdown Files
run: npm run lint:md
- name: Remove Markdownlint Warning Matcher
if: always()
run: echo "::remove-matcher owner=markdownlint::"
check-links:
name: Check Markdown Links
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Check Links
uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2.8.0
with:
fail: true