This is an automated email from the ASF dual-hosted git repository.

jiayu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sedona.git


The following commit(s) were added to refs/heads/master by this push:
     new 2d9edb4b90 [CI] Add lychee link checker workflow (#2727)
2d9edb4b90 is described below

commit 2d9edb4b90c959107e2131f2eb93eac058d4b37c
Author: John Bampton <[email protected]>
AuthorDate: Tue Mar 17 17:52:17 2026 +1000

    [CI] Add lychee link checker workflow (#2727)
---
 .github/workflows/links.yml | 62 +++++++++++++++++++++++++++++++++++++++++++++
 lychee.toml                 | 28 ++++++++++++++++++++
 2 files changed, 90 insertions(+)

diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml
new file mode 100644
index 0000000000..74b0d977df
--- /dev/null
+++ b/.github/workflows/links.yml
@@ -0,0 +1,62 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# To run similar tasks locally, install lychee and run the following at the 
root of the repository:
+# lychee .
+
+name: Links
+
+on:
+  repository_dispatch:
+  workflow_dispatch:
+  pull_request:
+  schedule:
+    - cron: '00 18 * * *'
+
+jobs:
+  check-links:
+    runs-on: ubuntu-latest
+    permissions:
+      issues: write # required for Broken Links Report
+    steps:
+      - uses: actions/checkout@v6
+        with:
+          persist-credentials: false
+      - name: Link Checker
+        id: lychee
+        uses: 
lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2.8.0
+        with:
+          args: --config lychee.toml .
+          fail: false
+
+      - name: Broken Links Report
+        if: steps.lychee.outputs.exit_code != 0 && github.event_name == 
'schedule'
+        uses: actions/github-script@v8
+        with:
+          script: |
+            const fs = require('fs');
+
+            // Read the markdown file
+            // Ensure the path is correct relative to the workspace root
+            const reportBody = fs.readFileSync('./lychee/out.md', 'utf8');
+
+            await github.rest.issues.create({
+              owner: context.repo.owner,
+              repo: context.repo.repo,
+              title: 'Broken Links Report',
+              body: reportBody
+            });
diff --git a/lychee.toml b/lychee.toml
new file mode 100644
index 0000000000..715429dd19
--- /dev/null
+++ b/lychee.toml
@@ -0,0 +1,28 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+accept = ['200', '301', '401', '403', '406', '429']
+
+exclude = [
+    '^file:///.*$',
+    '^https?://localhost.*$',
+    
'^https://sedona\.apache\.org/latest-snapshot/api/sql/Function/#st_flipcoordinates$',
+    '^https://www\.datasyslab\.net/$',
+    '^http://www\.kr/$'
+]
+
+timeout = 20

Reply via email to