From 2f839a1668c87d6f6cec80d8ddb634453f2e7e61 Mon Sep 17 00:00:00 2001 From: Ikrame Saadi Date: Tue, 3 Jun 2025 21:18:37 +0300 Subject: [PATCH 1/7] add github action: automated dead link checking with lychee-action - link-check.yml --- .github/workflows/link-check.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/link-check.yml diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml new file mode 100644 index 0000000..b2b7356 --- /dev/null +++ b/.github/workflows/link-check.yml @@ -0,0 +1,22 @@ +name: Awesome List Dead Links (daily check) # Name of the workflow + +on: + schedule: + - cron: '0 */24 * * *' # Schedule the workflow to run every 24 hours + workflow_dispatch: # Allows manual triggering of the workflow + +jobs: + linkChecker: + runs-on: ubuntu-latest # Use the latest Ubuntu runner + steps: + - name: Checkout repository # Step to checkout the repository + uses: actions/checkout@v4 # Use the checkout action version 4 + - name: Run lychee link checker # Step to run the lychee link checker + uses: lycheeverse/lychee-action@v1.10.0 # Use the lychee action version 1.10.0 + with: + args: --verbose --no-progress --exclude-mail --timeout 20 README.md # Arguments for the lychee link checker + - name: Upload link checker report # Step to upload the link checker report + uses: actions/upload-artifact@v4 # Use the upload artifact action version 4 + with: + name: lychee-report # Name of the artifact + path: ./lychee/report.md # Path to the report file From eaf1e0fa8c5c85b0b10500fb13a5ce8d37be91b1 Mon Sep 17 00:00:00 2001 From: Ikrame Saadi Date: Tue, 3 Jun 2025 21:25:28 +0300 Subject: [PATCH 2/7] fix: ensure lychee-action outputs markdown report for artifact upload -link-check.yml --- .github/workflows/link-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml index b2b7356..1647019 100644 --- a/.github/workflows/link-check.yml +++ b/.github/workflows/link-check.yml @@ -14,7 +14,7 @@ jobs: - name: Run lychee link checker # Step to run the lychee link checker uses: lycheeverse/lychee-action@v1.10.0 # Use the lychee action version 1.10.0 with: - args: --verbose --no-progress --exclude-mail --timeout 20 README.md # Arguments for the lychee link checker + args: --verbose --no-progress --exclude-mail --timeout 20 --format markdown --output ./lychee/report.md README.md # Arguments for the lychee link checker - name: Upload link checker report # Step to upload the link checker report uses: actions/upload-artifact@v4 # Use the upload artifact action version 4 with: From c0b7d7959883e6999f0f1fa0f55d2eb39e06324e Mon Sep 17 00:00:00 2001 From: Ikrame Saadi Date: Tue, 3 Jun 2025 21:33:29 +0300 Subject: [PATCH 3/7] fix: manual report.md creation for workflow persistent artifact logging --- lychee/report.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 lychee/report.md diff --git a/lychee/report.md b/lychee/report.md new file mode 100644 index 0000000..c6f1b27 --- /dev/null +++ b/lychee/report.md @@ -0,0 +1,4 @@ + From 19ae1b60e0854e66944f3215793f3bae071f6964 Mon Sep 17 00:00:00 2001 From: Ikrame Saadi Date: Tue, 3 Jun 2025 22:06:45 +0300 Subject: [PATCH 4/7] Delete lychee directory --- lychee/report.md | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 lychee/report.md diff --git a/lychee/report.md b/lychee/report.md deleted file mode 100644 index c6f1b27..0000000 --- a/lychee/report.md +++ /dev/null @@ -1,4 +0,0 @@ - From a631103a26fa45310a64271241cf8516bb0e52f0 Mon Sep 17 00:00:00 2001 From: Ikrame Saadi Date: Tue, 3 Jun 2025 22:08:55 +0300 Subject: [PATCH 5/7] fix: remove duplicate --output and set lychee report artifact correctly - link-check.yml --- .github/workflows/link-check.yml | 47 +++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml index 1647019..d1ee317 100644 --- a/.github/workflows/link-check.yml +++ b/.github/workflows/link-check.yml @@ -1,22 +1,43 @@ -name: Awesome List Dead Links (daily check) # Name of the workflow +# This workflow checks for dead links in the Awesome List on a daily basis. + +name: Awesome List Dead Links (daily check) on: + # Schedule the workflow to run every 24 hours. schedule: - - cron: '0 */24 * * *' # Schedule the workflow to run every 24 hours - workflow_dispatch: # Allows manual triggering of the workflow + - cron: '0 */24 * * *' + # Allows manual triggering of the workflow through the GitHub Actions UI. + workflow_dispatch: jobs: linkChecker: - runs-on: ubuntu-latest # Use the latest Ubuntu runner + # The job will run on the latest Ubuntu virtual environment. + runs-on: ubuntu-latest steps: - - name: Checkout repository # Step to checkout the repository - uses: actions/checkout@v4 # Use the checkout action version 4 - - name: Run lychee link checker # Step to run the lychee link checker - uses: lycheeverse/lychee-action@v1.10.0 # Use the lychee action version 1.10.0 + - name: Checkout repository + # Uses the official GitHub checkout action to clone the repository. + uses: actions/checkout@v4 + + - name: Run lychee link checker + # Utilizes the lychee-action to check for dead links in the specified file. + uses: lycheeverse/lychee-action@v1.10.0 with: - args: --verbose --no-progress --exclude-mail --timeout 20 --format markdown --output ./lychee/report.md README.md # Arguments for the lychee link checker - - name: Upload link checker report # Step to upload the link checker report - uses: actions/upload-artifact@v4 # Use the upload artifact action version 4 + # Arguments for the lychee link checker: + # --verbose: Enables verbose logging. + # --no-progress: Disables progress bar output. + # --exclude-mail: Excludes email addresses from the link checking. + # --timeout 20: Sets the request timeout to 20 seconds. + # --format markdown: Outputs the report in markdown format. + # README.md: The file to be checked. + args: --verbose --no-progress --exclude-mail --timeout 20 --format markdown README.md + # Designates the output file for the report. + output: lychee/report.md + + - name: Upload link checker report + # Uploads the generated report as an artifact. + uses: actions/upload-artifact@v4 with: - name: lychee-report # Name of the artifact - path: ./lychee/report.md # Path to the report file + # Name of the artifact. + name: lychee-report + # File path to the report. + path: lychee/report.md From f2432c3d3d5fddf9e45fd736b0b3e1055e44de84 Mon Sep 17 00:00:00 2001 From: Ikrame Saadi Date: Tue, 3 Jun 2025 22:16:10 +0300 Subject: [PATCH 6/7] add: .lycheeignore to skip know false positives --- .lycheeignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .lycheeignore diff --git a/.lycheeignore b/.lycheeignore new file mode 100644 index 0000000..456ec6a --- /dev/null +++ b/.lycheeignore @@ -0,0 +1,3 @@ +https://www.reddit.com/r/startups/ +https://substack.com/ +https://sideprojectstack.com/ From 4c9e07c872b34bd8b2a20229273568d04e9d4f9d Mon Sep 17 00:00:00 2001 From: Ikrame Saadi Date: Tue, 3 Jun 2025 22:18:16 +0300 Subject: [PATCH 7/7] enhancement: worfklow to ignore false positives in .lycheeignore file - link-check.yml --- .github/workflows/link-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml index d1ee317..2b9100e 100644 --- a/.github/workflows/link-check.yml +++ b/.github/workflows/link-check.yml @@ -29,7 +29,7 @@ jobs: # --timeout 20: Sets the request timeout to 20 seconds. # --format markdown: Outputs the report in markdown format. # README.md: The file to be checked. - args: --verbose --no-progress --exclude-mail --timeout 20 --format markdown README.md + args: --verbose --no-progress --exclude-mail --timeout 20 --format markdown --exclude-list .lycheeignore README.md # Designates the output file for the report. output: lychee/report.md