Skip to content

Bump typescript from 4.5.4 to 5.7.2 #41

Bump typescript from 4.5.4 to 5.7.2

Bump typescript from 4.5.4 to 5.7.2 #41

Workflow file for this run

name: 'Link Checker: All English'
# **What it does**: Renders the content of every page and check all internal links.
# **Why we have it**: To make sure all links connect correctly.
# **Who does it impact**: Docs content.
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
permissions:
contents: read
# Needed for the 'trilom/file-changes-action' action
pull-requests: read
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
build:
runs-on: ${{ fromJSON('["ubuntu-latest", "self-hosted"]')[github.repository == 'github/docs-internal'] }}
steps:
- name: Checkout
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
- name: Setup node
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561
with:
node-version: 16.13.x
cache: npm
- name: Install
run: npm ci
- name: Gather files changed
uses: trilom/file-changes-action@a6ca26c14274c33b15e6499323aac178af06ad4b
id: get_diff_files
# Necessary because trilom/file-changes-action can't escape each file
# name for using in bash. So, we do it ourselves.
# trilom/file-changes-action will, by default produce outputs
# in JSON format. We consume that and set a new output where each
# filename is wrapped in quotation marks.
# Perhaps some day we can rely on this directly based on;
# https://github.com/trilom/file-changes-action/issues/130
- name: Escape each diff file name
id: get_diff_files_escaped
uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
with:
github-token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}
script: |
const input = JSON.parse('${{ steps.get_diff_files.outputs.files }}')
const files = input.map(filename => `"${filename}"`)
core.setOutput('files', files.join(' '))
- name: Link check (warnings, changed files)
run: |
./script/rendered-content-link-checker.mjs \
--language en \
--max 100 \
--check-anchors \
--check-images \
--verbose \
${{ steps.get_diff_files_escaped.outputs.files }}
- name: Link check (critical, all files)
run: |
./script/rendered-content-link-checker.mjs \
--language en \
--exit \
--verbose \
--check-images \
--level critical