-
Notifications
You must be signed in to change notification settings - Fork 423
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Don't fail broken links checker
- Loading branch information
1 parent
a693c03
commit 42870ba
Showing
1 changed file
with
53 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,60 +7,60 @@ | |
name: Check for broken links | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
schedule: # Run every weekday at 12:30 UTC | ||
- cron: "30 12 * * 1-5" | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
schedule: # Run every weekday at 12:30 UTC | ||
- cron: '30 12 * * 1-5' | ||
|
||
jobs: | ||
Check-for-broken-links: | ||
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@v4 | ||
- name: Restore lychee cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: .lycheecache | ||
key: cache-lychee-${{ github.sha }} | ||
restore-keys: cache-lychee- | ||
- name: Link Checker | ||
id: lychee | ||
uses: lycheeverse/[email protected] | ||
with: | ||
fail: true | ||
args: --verbose --no-progress --exclude-file .lycheeignore '**/*.md' | ||
output: ${{ env.issue-content }} | ||
Check-for-broken-links: | ||
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@v4 | ||
- name: Restore lychee cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: .lycheecache | ||
key: cache-lychee-${{ github.sha }} | ||
restore-keys: cache-lychee- | ||
- name: Link Checker | ||
id: lychee | ||
uses: lycheeverse/[email protected] | ||
with: | ||
fail: false | ||
args: --verbose --no-progress --exclude-file .lycheeignore '**/*.md' | ||
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: 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 }} | ||
broken-link, docs | ||
# 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 }} | ||
broken-link, docs |