Skip to content

try out remark-lint GHA #9

try out remark-lint GHA

try out remark-lint GHA #9

Workflow file for this run

name: Check all content (MDX) links
on:
pull_request:
jobs:
# check-for-absolute-urls:
# name: Check for Absolute URLs
# runs-on: ubuntu-latest
# remark-lint:
# name: runner / remark-lint
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v4
# with:
# node-version: 18
# - name: Install deps
# run: npm install
# - name: Install remark presets
# run: npm install remark-lint-no-dead-urls
# - name: run remark-cli
# run: |
# npx remark-cli . -qf -e=md,mdx --use=remark-mdx --use remark-frontmatter --use remark-gfm \
# --use 'remark-lint-no-dead-urls=skipLocalhost:true,skipUrlPatterns:["https://www.notion.so/prismaio","https://www.prisma.io/docs","https://dash.cloudflare.com","https://www.cloudflare.com"]'
remark-lint:
name: runner / remark-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- name: install remark presets
run: npm install remark-lint-no-dead-urls
shell: bash
- name: remark-lint
uses: reviewdog/action-remark-lint@v5
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-check
remark_args: '-qf -e=md,mdx --use=remark-mdx --use remark-frontmatter --use remark-gfm --use remark-lint-no-dead-urls=skipLocalhost:true,skipUrlPatterns:["https://www.notion.so/prismaio","https://www.prisma.io/docs","https://dash.cloudflare.com","https://www.cloudflare.com"]'
# check-for-redirects:
# name: Check for needed redirects
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Create suggested redirects
# id: redirects
# run: |
# bash .github/workflows/scripts/generate-redirects.sh
# - name: Find existing comment
# uses: peter-evans/find-comment@v3
# id: find-existing-comment-redirect
# with:
# issue-number: ${{ github.event.pull_request.number }}
# comment-author: 'github-actions[bot]'
# body-includes: following redirects
# - name: Create comment
# if: steps.find-existing-comment-redirect.outputs.comment-id == ''
# uses: peter-evans/create-or-update-comment@v4
# with:
# issue-number: ${{ github.event.pull_request.number }}
# body: ${{ steps.redirects.outputs.body }}
# - name: Update comment
# if: steps.find-existing-comment-redirect.outputs.comment-id != ''
# uses: peter-evans/create-or-update-comment@v4
# with:
# comment-id: ${{ steps.find-existing-comment-redirect.outputs.comment-id }}
# body: ${{ steps.redirects.outputs.body }}
# edit-mode: replace