Skip to content

Commit

Permalink
change link checker
Browse files Browse the repository at this point in the history
  • Loading branch information
peppi-lotta committed Nov 11, 2024
1 parent c742269 commit 4134bb4
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 11 deletions.
37 changes: 26 additions & 11 deletions .github/workflows/broken-link-check.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,37 @@
name: Links

on:
repository_dispatch:
workflow_dispatch:
schedule:
- cron: "0 0 * * 0"
repository_dispatch: # run manually
types: [check-link]
- cron: "0 0 * * 0"

permissions: {}

name: Broken Link Check
jobs:
check:
name: Broken Link Check
linkChecker:
runs-on: ubuntu-latest

permissions:
contents: read
issues: write

if: github.repository == 'metal3-io/metal3-io.github.io'
if: github.repository == 'peppi-lotta/metal3-io.github.io'
steps:
- name: Broken Link Check
uses: technote-space/broken-link-checker-action@b8332d945b97f8b52eb8d7d889a1e0e37106c1a9 # v2.3.2
- uses: actions/checkout@v4

- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v2
with:
args: --user-agent "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0" --no-progress --accept 429 './**/*.md' './**/*.html' './**/*.rst'
output: /tmp/lychee_output.md
fail: false

- name: Create Issue From File
if: steps.lychee.outputs.exit_code != 0
uses: peter-evans/create-issue-from-file@v5
with:
title: Link Checker Report
content-filepath: /tmp/lychee_output.md
labels: |
report
automated issue
4 changes: 4 additions & 0 deletions .lycheeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
https://localhost
http://localhost
https://0.0.0.0
http://0.0.0.0

0 comments on commit 4134bb4

Please sign in to comment.