New broken link report (#16412)
* add linkinator npm package * add new script that uses Linkinator * reorg the excluded links file and update comments * replace blc artifacts with linkinator artifacts in .gitignore * update the scheduled workflow to use the new script * dismantle BLC scripts * add workflow_dispatch event so we can test this manually * npm uninstall broken-link-checker * use different exit codes depending on whether broken links are found
This commit is contained in:
12
.github/workflows/check-all-english-links.yml
vendored
12
.github/workflows/check-all-english-links.yml
vendored
@@ -1,6 +1,7 @@
|
||||
name: Check all English links
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "40 19 * * *" # once a day at 19:40 UTC / 11:40 PST
|
||||
|
||||
@@ -10,21 +11,16 @@ jobs:
|
||||
if: github.repository == 'github/docs-internal'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||
- name: npm ci
|
||||
run: npm ci
|
||||
- name: npm run build
|
||||
run: npm run build
|
||||
- name: Run script
|
||||
run: script/check-external-links en > broken_links.md
|
||||
run: script/check-english-links > broken_links.md
|
||||
- name: Check if any broken links
|
||||
id: check
|
||||
run: |
|
||||
if [ "$(grep 'All links are good' broken_links.md)" ]; then
|
||||
if [ "$(grep '0 broken links found' broken_links.md)" ]; then
|
||||
echo ::set-output name=continue::no
|
||||
else
|
||||
echo "::set-output name=continue::yes"
|
||||
echo "::set-output name=title::$(grep 'found on help.github.com' broken_links.md)"
|
||||
echo "::set-output name=title::$(head -1 broken_links.md)"
|
||||
fi
|
||||
- if: ${{ steps.check.outputs.continue == 'yes' }}
|
||||
name: Create issue from file
|
||||
|
||||
Reference in New Issue
Block a user