lycheeverse / lychee-action

Github action to check for broken links in Markdown, HTML, and text files using lychee, a fast link checker written in Rust.
https://lychee.cli.rs
Apache License 2.0
292 stars 39 forks source link

Q: Can we check a live website online as lychee can #207

Closed zierbeek closed 6 months ago

zierbeek commented 10 months ago

Hi,

I would like to setup an automatic action to check my personal website online.

What would i need to create if i want to check www....com every week?

Thanks!

mre commented 10 months ago

Something like this should work:

name: Links

on:
  schedule:
    - cron: "00 8 * * 1" # check at 8am on Monday

jobs:
  linkChecker:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3

      - name: Link Checker
        uses: lycheeverse/lychee-action@v1.8.0
        with:
          args: --verbose https://example.com

      - name: Create Issue From 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