Skip to content

feat: add PR link checking workflow and fix links #30

feat: add PR link checking workflow and fix links

feat: add PR link checking workflow and fix links #30

Workflow file for this run

name: PR Links
on:
pull_request:
branches: [redesign]
workflow_dispatch:
jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
# TODO: use astro action, when pnpm action is enabled in the org
- name: Set up Node.js
uses: actions/setup-node@v6
with:
# node-version-file: ".nvmrc" use when .nvmrc is on root of the repo
node-version: "24.13"
# cache: "npm" use when package-lock.json is on root of the repo
- name: Install Node.js dependencies
working-directory: astro
run: npm ci
- name: Build Astro site
working-directory: astro
run: npm run build
- name: Check links
uses: lycheeverse/lychee-action@a8c4c7cb88f0c7386610c35eb25108e448569cb0 # v2.7.0
with:
workingDirectory: astro # TODO: change when Astro site is moved to root
args: |
--root-dir $PWD/dist
--remap 'https://expressjs\.com\/(.*)/ file://'$PWD'/dist/$1/index.html'
--remap 'https://expressjs\.com\/(.*)\.html#(.*) file://'$PWD'/dist/$1/index.html#$2'
--remap 'https://expressjs\.com\/(.*)\.html file://'$PWD'/dist/$1/index.html'
dist/
fail: true