Create a weekly 404 checker for all Consul docs content (#16603)

This commit is contained in:
Eddie Rowe 2023-03-10 14:13:14 -06:00 committed by GitHub
parent eeae2812d6
commit 7f7f28e69c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

30
.github/workflows/broken-link-check.yml vendored Normal file
View file

@ -0,0 +1,30 @@
name: Broken Link Check
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 1"
jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run lychee link checker
id: lychee
uses: lycheeverse/lychee-action@v1.6.1
with:
args: ./docs --base https://developer.hashicorp.com/ --exclude-all-private --exclude .png --exclude .svg --max-concurrency=24 --no-progress --verbose
# Fail GitHub action when broken links are found?
fail: false
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Create GitHub Issue From lychee output file
if: env.lychee_exit_code != 0
uses: peter-evans/create-issue-from-file@v4
with:
title: Link Checker Report
content-filepath: ./lychee/out.md
labels: report, automated issue