Преглед на файлове

Replace Awesome Bot with Lychee for link checking

- Switch from awesome_bot (Ruby 2.7, unmaintained) to lychee (Rust, actively maintained)
- Run on pull requests as well as pushes to master, so broken links are caught before merge
- Expand whitelist with domains known to block crawlers: leanpub.com, jetbrains.com, wiki.php.net, zend.com, nusphere.com
- Accept HTTP 429 (rate limited) as non-failure to avoid false positives
- Upload lychee results as an artifact on failure
pull/1420/head
Jamie York преди 1 месец
родител
ревизия
3b37756821
променени са 2 файла, в които са добавени 41 реда и са изтрити 26 реда
  1. 0
    26
      .github/workflows/awesomebot.yml
  2. 41
    0
      .github/workflows/ci.yml

+ 0
- 26
.github/workflows/awesomebot.yml Целия файл

@@ -1,26 +0,0 @@
1
-name: Awesome Bot
2
-on:
3
-  push:
4
-    branches:
5
-      - master
6
-
7
-jobs:
8
-  build:
9
-    runs-on: ubuntu-latest
10
-    steps:
11
-    - uses: actions/checkout@v4
12
-    - uses: ruby/setup-ruby@v1
13
-      with:
14
-        ruby-version: '2.7'
15
-
16
-    - name: Install Awesome Bot
17
-      run: gem install awesome_bot
18
-
19
-    - name: Run Awesome Bot
20
-      run: awesome_bot README.md --request-delay 1 --allow-dupe --white-list oreilly.com,youtube.com,new.drupal.org
21
-
22
-    - uses: actions/upload-artifact@v4
23
-      if: failure()
24
-      with:
25
-        name: ab-results
26
-        path: ab-results-README.md-filtered.json

+ 41
- 0
.github/workflows/ci.yml Целия файл

@@ -0,0 +1,41 @@
1
+name: CI
2
+
3
+on:
4
+  push:
5
+    branches:
6
+      - master
7
+  pull_request:
8
+    branches:
9
+      - master
10
+
11
+jobs:
12
+  linkcheck:
13
+    name: Link Check
14
+    runs-on: ubuntu-latest
15
+    steps:
16
+      - uses: actions/checkout@v4
17
+
18
+      - name: Check links
19
+        uses: lycheeverse/lychee-action@v2
20
+        with:
21
+          args: >-
22
+            --verbose
23
+            --no-progress
24
+            --accept 200,206,429
25
+            --timeout 20
26
+            --exclude "leanpub\.com"
27
+            --exclude "oreilly\.com"
28
+            --exclude "youtube\.com"
29
+            --exclude "jetbrains\.com"
30
+            --exclude "wiki\.php\.net"
31
+            --exclude "new\.drupal\.org"
32
+            --exclude "zend\.com"
33
+            --exclude "nusphere\.com"
34
+            README.md
35
+          fail: true
36
+
37
+      - uses: actions/upload-artifact@v4
38
+        if: failure()
39
+        with:
40
+          name: lychee-results
41
+          path: lychee/out.md

Loading…
Отказ
Запис