mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
docs: test broken links in website (#1912)
The action triggers manually as a first step to test this functionality. In the near future, we might schedule it
This commit is contained in:
parent
469bd1622e
commit
6ef8c78e06
1
.github/workflows/build_doc_prs.yaml
vendored
1
.github/workflows/build_doc_prs.yaml
vendored
@ -7,7 +7,6 @@ on:
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
55
.github/workflows/check_links.yaml
vendored
Normal file
55
.github/workflows/check_links.yaml
vendored
Normal file
@ -0,0 +1,55 @@
|
||||
name: Check links
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
env:
|
||||
issue-lookup-label: automated-link-issue
|
||||
issue-content: ./lychee-out.md
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Restore lychee cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .lycheecache
|
||||
key: cache-lychee-${{ github.sha }}
|
||||
restore-keys: cache-lychee-
|
||||
- name: Link Checker
|
||||
id: lychee
|
||||
uses: lycheeverse/lychee-action@v1.5.0
|
||||
with:
|
||||
fail: true
|
||||
args: '"./website/docs/**/*.md" "./website/docs/**/*.mdx" "./src/mailtemplates/*.mustache" --scheme http --scheme https --cache --max-cache-age 7d --exclude-mail --verbose' # other excludes are in .lycheeignore
|
||||
output: ${{ env.issue-content }}
|
||||
|
||||
# Permissions (issues: read)
|
||||
- name: 'Look for an existing issue'
|
||||
if: ${{ failure() }}
|
||||
id: last-issue
|
||||
uses: micalevisk/last-issue-action@v2
|
||||
# Find the last updated open issue with a `automated-issue` label:
|
||||
with:
|
||||
state: open
|
||||
labels: ${{ env.issue-lookup-label }}
|
||||
|
||||
# Permissions (issues: write)
|
||||
- name: 'Create a new issue, or update an existing one'
|
||||
if: ${{ failure() }}
|
||||
uses: peter-evans/create-issue-from-file@v4
|
||||
with:
|
||||
title: 'docs: Broken links found'
|
||||
content-filepath: ${{ env.issue-content }}
|
||||
# Update an existing issue if one was found (issue_number),
|
||||
# otherwise an empty value creates a new issue:
|
||||
issue-number: ${{ steps['last-issue']['outputs']['issue-number'] }}
|
||||
# Add a label(s) that `last-issue` can use to find this issue,
|
||||
# and any other relevant labels for the issue itself:
|
||||
labels: |
|
||||
${{ env.issue-lookup-label }}
|
||||
docs
|
20
.lycheeignore
Normal file
20
.lycheeignore
Normal file
@ -0,0 +1,20 @@
|
||||
dev-example-okta.com
|
||||
.*-dsn.algolia.net
|
||||
www.linkedin.com/company/getunleash
|
||||
|
||||
.*.unleash.host.*.com.*
|
||||
unleash.*.com/api/
|
||||
secure-unleash.herokuapp.com
|
||||
|
||||
localhost
|
||||
changeme
|
||||
hostname
|
||||
unleash:4242
|
||||
user:password@url
|
||||
your.heroku.instance.com
|
||||
your-api-url
|
||||
version.unleash.run
|
||||
|
||||
datadog.*/api/v1/events
|
||||
ddog.*/api/v1/events
|
||||
api.datadoghq.com
|
Loading…
Reference in New Issue
Block a user