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

critas pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iotdb-docs.git


The following commit(s) were added to refs/heads/main by this push:
     new 184851ec ci:add check links (#506)
184851ec is described below

commit 184851ec8f5dba68c1572079d62a3e8953b911f4
Author: CritasWang <[email protected]>
AuthorDate: Tue Jan 7 18:53:01 2025 +0800

    ci:add check links (#506)
---
 .github/workflows/site-build.yaml   | 23 +++++++++++++
 package.json                        |  2 ++
 pnpm-lock.yaml                      | 68 +++++++++++++++++++++++++++++++++++++
 src/.vuepress/config_check_links.ts | 26 ++++++++++++++
 4 files changed, 119 insertions(+)

diff --git a/.github/workflows/site-build.yaml 
b/.github/workflows/site-build.yaml
index 91594019..9b27734b 100644
--- a/.github/workflows/site-build.yaml
+++ b/.github/workflows/site-build.yaml
@@ -37,6 +37,29 @@ jobs:
         env:
           NODE_OPTIONS: --max_old_space_size=8192
         run: pnpm build
+  
+  linksCheck:
+    runs-on: ubuntu-latest
+    if: github.event_name == 'pull_request'
+
+    steps:
+      - uses: actions/checkout@v4
+
+      - name: Install pnpm
+        uses: pnpm/action-setup@v4
+
+      - name: Use Node.js 22
+        uses: actions/setup-node@v4
+        with:
+          node-version: 22
+
+      - name: Install dependencies
+        run: pnpm install
+
+      - name: Test build website
+        env:
+          NODE_OPTIONS: --max_old_space_size=8192
+        run: pnpm run check-links 
 
   deploy:
     runs-on: ubuntu-latest
diff --git a/package.json b/package.json
index e338ec82..3f953c9d 100644
--- a/package.json
+++ b/package.json
@@ -12,6 +12,7 @@
   ],
   "scripts": {
     "build": "node --max_old_space_size=8192  
./node_modules/vuepress/bin/vuepress.js build src",
+    "check-links": "node --max_old_space_size=8192  
./node_modules/vuepress/bin/vuepress.js build src -c 
./src/.vuepress/config_check_links.ts",
     "clean-dev": "vuepress dev src --clean-cache",
     "dev": "vuepress dev src",
     "update-package": "npx vp-update",
@@ -23,6 +24,7 @@
     "@vuepress/bundler-vite": "2.0.0-rc.19",
     "@vuepress/helper": "2.0.0-rc.66",
     "@vuepress/plugin-docsearch": "2.0.0-rc.67",
+    "@vuepress/plugin-links-check": "2.0.0-rc.68",
     "mathjax-full": "3.2.2",
     "sass-embedded": "1.83.0",
     "vue": "3.5.13",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 870fc6aa..6aba59c2 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -17,6 +17,9 @@ importers:
       '@vuepress/plugin-docsearch':
         specifier: 2.0.0-rc.67
         version: 
2.0.0-rc.67(@algolia/[email protected])([email protected])([email protected])([email protected](@vuepress/[email protected](@types/[email protected])([email protected])([email protected]))([email protected])([email protected]([email protected])))
+      '@vuepress/plugin-links-check':
+        specifier: 2.0.0-rc.68
+        version: 
2.0.0-rc.68([email protected])([email protected](@vuepress/[email protected](@types/[email protected])([email protected])([email protected]))([email protected])([email protected]([email protected])))
       mathjax-full:
         specifier: 3.2.2
         version: 3.2.2
@@ -808,51 +811,61 @@ packages:
     resolution: {integrity: 
sha512-QAg11ZIt6mcmzpNE6JZBpKfJaKkqTm1A9+y9O+frdZJEuhQxiugM05gnCWiANHj4RmbgeVJpTdmKRmH/a+0QbA==}
     cpu: [arm]
     os: [linux]
+    libc: [glibc]
 
   '@rollup/[email protected]':
     resolution: {integrity: 
sha512-dRP9PEBfolq1dmMcFqbEPSd9VlRuVWEGSmbxVEfiq2cs2jlZAl0YNxFzAQS2OrQmsLBLAATDMb3Z6MFv5vOcXg==}
     cpu: [arm]
     os: [linux]
+    libc: [musl]
 
   '@rollup/[email protected]':
     resolution: {integrity: 
sha512-uGr8khxO+CKT4XU8ZUH1TTEUtlktK6Kgtv0+6bIFSeiSlnGJHG1tSFSjm41uQ9sAO/5ULx9mWOz70jYLyv1QkA==}
     cpu: [arm64]
     os: [linux]
+    libc: [glibc]
 
   '@rollup/[email protected]':
     resolution: {integrity: 
sha512-QF54q8MYGAqMLrX2t7tNpi01nvq5RI59UBNx+3+37zoKX5KViPo/gk2QLhsuqok05sSCRluj0D00LzCwBikb0A==}
     cpu: [arm64]
     os: [linux]
+    libc: [musl]
 
   '@rollup/[email protected]':
     resolution: {integrity: 
sha512-vPul4uodvWvLhRco2w0GcyZcdyBfpfDRgNKU+p35AWEbJ/HPs1tOUrkSueVbBS0RQHAf/A+nNtDpvw95PeVKOA==}
     cpu: [loong64]
     os: [linux]
+    libc: [glibc]
 
   '@rollup/[email protected]':
     resolution: {integrity: 
sha512-pTnTdBuC2+pt1Rmm2SV7JWRqzhYpEILML4PKODqLz+C7Ou2apEV52h19CR7es+u04KlqplggmN9sqZlekg3R1A==}
     cpu: [ppc64]
     os: [linux]
+    libc: [glibc]
 
   '@rollup/[email protected]':
     resolution: {integrity: 
sha512-vWXy1Nfg7TPBSuAncfInmAI/WZDd5vOklyLJDdIRKABcZWojNDY0NJwruY2AcnCLnRJKSaBgf/GiJfauu8cQZA==}
     cpu: [riscv64]
     os: [linux]
+    libc: [glibc]
 
   '@rollup/[email protected]':
     resolution: {integrity: 
sha512-/yqC2Y53oZjb0yz8PVuGOQQNOTwxcizudunl/tFs1aLvObTclTwZ0JhXF2XcPT/zuaymemCDSuuUPXJJyqeDOg==}
     cpu: [s390x]
     os: [linux]
+    libc: [glibc]
 
   '@rollup/[email protected]':
     resolution: {integrity: 
sha512-fzgeABz7rrAlKYB0y2kSEiURrI0691CSL0+KXwKwhxvj92VULEDQLpBYLHpF49MSiPG4sq5CK3qHMnb9tlCjBw==}
     cpu: [x64]
     os: [linux]
+    libc: [glibc]
 
   '@rollup/[email protected]':
     resolution: {integrity: 
sha512-xQTDVzSGiMlSshpJCtudbWyRfLaNiVPXt1WgdWTwWz9n0U12cI2ZVtWe/Jgwyv/6wjL7b66uu61Vg0POWVfz4g==}
     cpu: [x64]
     os: [linux]
+    libc: [musl]
 
   '@rollup/[email protected]':
     resolution: {integrity: 
sha512-wSXmDRVupJstFP7elGMgv+2HqXelQhuNf+IS4V+nUpNVi/GUiBgDmfwD0UGN3pcAnWsgKG3I52wMOBnk1VHr/A==}
@@ -1083,6 +1096,11 @@ packages:
     peerDependencies:
       vuepress: 2.0.0-rc.19
 
+  '@vuepress/[email protected]':
+    resolution: {integrity: 
sha512-4TlvjNQEiwDCCzb6m5bgfTBGdcMXW+78kevkOBW+1bksYjX0B4Gp8tKfJvzz3YwuHr/FCZ92zhPfSvhsvC5c0g==}
+    peerDependencies:
+      vuepress: 2.0.0-rc.19
+
   '@vuepress/[email protected]':
     resolution: {integrity: 
sha512-RxhUIR+GFXXjCy5aFHHLvIKPcyyDhyzmka7shV+xr/vaU+EDbnQFrF67qo9pLDfzJc0KKTL9cKo4CcjkAoZ/tQ==}
     peerDependencies:
@@ -1155,6 +1173,11 @@ packages:
     peerDependencies:
       vuepress: 2.0.0-rc.19
 
+  '@vuepress/[email protected]':
+    resolution: {integrity: 
sha512-ZA4YZO2lms31/GBS97bmezO3B6wjXDGJTKciJSd1Yv6nmYnoV6X7TH/xJeMCOSAg7XlZrvYZ2I+LMx33ELQ7Fg==}
+    peerDependencies:
+      vuepress: 2.0.0-rc.19
+
   '@vuepress/[email protected]':
     resolution: {integrity: 
sha512-heSwOXrgh0hGDxDD6zCfi4xe1Uaz4GgguWdnWEMl1ewhssjjhC07be/FNt9wwWKjTJkkKHsdTUwyKV0R+mL3Gw==}
     peerDependencies:
@@ -1272,12 +1295,21 @@ packages:
   '@vueuse/[email protected]':
     resolution: {integrity: 
sha512-C12RukhXiJCbx4MGhjmd/gH52TjJsc3G0E0kQj/kb19H3Nt6n1CA4DRWuTdWWcaFRdlTe0npWDS942mvacvNBw==}
 
+  '@vueuse/[email protected]':
+    resolution: {integrity: 
sha512-cnV8QDKZrsyKC7tWjPbeEUz2cD9sa9faxF2YkR8QqNwfofgbOhmfIgvSYmkp+ttSvfOw4E6hLcQx15mRPr0yBA==}
+
   '@vueuse/[email protected]':
     resolution: {integrity: 
sha512-Yzimd1D3sjxTDOlF05HekU5aSGdKjxhuhRFHA7gDWLn57PRbBIh+SF5NmjhJ0WRgF3my7T8LBucyxdFJjIfRJQ==}
 
+  '@vueuse/[email protected]':
+    resolution: {integrity: 
sha512-M/iQHHjMffOv2npsw2ihlUx1CTiBwPEgb7DzByLq7zpg1+Ke8r7s9p5ybUWc5OIeGewtpY4Xy0R2cKqFqM8hFg==}
+
   '@vueuse/[email protected]':
     resolution: {integrity: 
sha512-3i6qtcq2PIio5i/vVYidkkcgvmTjCqrf26u+Fd4LhnbBmIT6FN8y6q/GJERp8lfcB9zVEfjdV0Br0443qZuJpw==}
 
+  '@vueuse/[email protected]':
+    resolution: {integrity: 
sha512-X3YD35GUeW0d5Gajcwv9jdLAJTV2Jdb/Ll6Ii2JIYcKLYZqv5wxyLeKtiQkqWmHg3v0J0ZWjDUMVOw2E7RCXfA==}
+
   [email protected]:
     resolution: {integrity: 
sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
     peerDependencies:
@@ -3889,6 +3921,18 @@ snapshots:
     transitivePeerDependencies:
       - typescript
 
+  
'@vuepress/[email protected]([email protected])([email protected](@vuepress/[email protected](@types/[email protected])([email protected])([email protected]))([email protected])([email protected]([email protected])))':
+    dependencies:
+      '@vue/shared': 3.5.13
+      '@vueuse/core': 12.3.0([email protected])
+      cheerio: 1.0.0
+      fflate: 0.8.2
+      gray-matter: 4.0.3
+      vue: 3.5.13([email protected])
+      vuepress: 
2.0.0-rc.19(@vuepress/[email protected](@types/[email protected])([email protected])([email protected]))([email protected])([email protected]([email protected]))
+    transitivePeerDependencies:
+      - typescript
+
   
'@vuepress/[email protected](@vueuse/[email protected]([email protected]))([email protected](@vuepress/[email protected](@types/[email protected])([email protected])([email protected]))([email protected])([email protected]([email protected])))':
     dependencies:
       vuepress: 
2.0.0-rc.19(@vuepress/[email protected](@types/[email protected])([email protected])([email protected]))([email protected])([email protected]([email protected]))
@@ -4007,6 +4051,13 @@ snapshots:
     transitivePeerDependencies:
       - typescript
 
+  
'@vuepress/[email protected]([email protected])([email protected](@vuepress/[email protected](@types/[email protected])([email protected])([email protected]))([email protected])([email protected]([email protected])))':
+    dependencies:
+      '@vuepress/helper': 
2.0.0-rc.68([email protected])([email protected](@vuepress/[email protected](@types/[email protected])([email protected])([email protected]))([email protected])([email protected]([email protected])))
+      vuepress: 
2.0.0-rc.19(@vuepress/[email protected](@types/[email protected])([email protected])([email protected]))([email protected])([email protected]([email protected]))
+    transitivePeerDependencies:
+      - typescript
+
   
'@vuepress/[email protected]([email protected])([email protected])([email protected](@vuepress/[email protected](@types/[email protected])([email protected])([email protected]))([email protected])([email protected]([email protected])))':
     dependencies:
       '@mdit/plugin-container': 0.14.0([email protected])
@@ -4225,14 +4276,31 @@ snapshots:
     transitivePeerDependencies:
       - typescript
 
+  '@vueuse/[email protected]([email protected])':
+    dependencies:
+      '@types/web-bluetooth': 0.0.20
+      '@vueuse/metadata': 12.3.0
+      '@vueuse/shared': 12.3.0([email protected])
+      vue: 3.5.13([email protected])
+    transitivePeerDependencies:
+      - typescript
+
   '@vueuse/[email protected]': {}
 
+  '@vueuse/[email protected]': {}
+
   '@vueuse/[email protected]([email protected])':
     dependencies:
       vue: 3.5.13([email protected])
     transitivePeerDependencies:
       - typescript
 
+  '@vueuse/[email protected]([email protected])':
+    dependencies:
+      vue: 3.5.13([email protected])
+    transitivePeerDependencies:
+      - typescript
+
   [email protected]([email protected]):
     dependencies:
       acorn: 8.12.1
diff --git a/src/.vuepress/config_check_links.ts 
b/src/.vuepress/config_check_links.ts
new file mode 100644
index 00000000..537fa449
--- /dev/null
+++ b/src/.vuepress/config_check_links.ts
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+
+import { linksCheckPlugin } from '@vuepress/plugin-links-check'
+import { defineUserConfig } from 'vuepress';
+import config from './config.js';
+
+if(config.plugins === undefined) config.plugins = [];
+config.plugins = [...config.plugins,linksCheckPlugin({build: 'error'})];
+
+export default defineUserConfig(config);

Reply via email to