Skip to content

Commit ae7748d

Browse files
razor-xclaude
andauthored
Move validate to check workflow (#1112)
* Move validate to check workflow * fix: exclude angle brackets from bare URL match in validate-links The bare absolute-URL regex stopped only at whitespace, `)`, and `"`. When a `docs.seam.co/latest/...` URL appeared as anchor text inside HTML (e.g. `>https://docs.seam.co/latest/foo</a></td>`), the match greedily swallowed the trailing tags and reported the malformed path as broken. Adding `<` and `>` to the exclusion set lets the bare URL pattern terminate at the closing `<`, so cross-section absolute URLs in the guides README validate cleanly. * Remove .gitbook refs to removed page --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent afb0ffe commit ae7748d

4 files changed

Lines changed: 18 additions & 24 deletions

File tree

.gitbook.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,3 @@ redirects:
2323
core-concepts/connect-webviews: core-concepts/connect-webviews/README.md
2424
capability-guides/access-systems/understanding-acs-differences: capability-guides/access-systems/README.md
2525
capability-guides/thermostats/creating-and-managing-climate-schedules: capability-guides/thermostats/creating-and-managing-thermostat-schedules.md
26-
ui-components/overview/react-components/supported-devices-table: ui-components/overview/make-a-supported-devices-page.md
27-
ui-components/overview/getting-started-with-seam-components/angular: ui-components/overview/make-a-supported-devices-page.md
28-
ui-components/overview/getting-started-with-seam-components/vue: ui-components/overview/make-a-supported-devices-page.md

.github/workflows/check.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,20 @@ jobs:
3232
uses: ./.github/actions/setup
3333
- name: Typecheck
3434
run: npm run typecheck
35+
validate:
36+
name: Validate paths and links
37+
runs-on: ubuntu-latest
38+
timeout-minutes: 30
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@v4
42+
- name: Setup
43+
uses: ./.github/actions/setup
44+
- name: Validate SUMMARY.md paths
45+
run: npm run validate-paths
46+
- name: Validate cross-site links
47+
run: npm run validate-links
48+
- name: Validate all pages are in SUMMARY.md
49+
run: npm run validate-orphan-pages
50+
- name: Validate redirect targets
51+
run: npm run validate-redirects

.github/workflows/generate.yml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -66,23 +66,3 @@ jobs:
6666
commit_user_name: ${{ secrets.GIT_USER_NAME }}
6767
commit_user_email: ${{ secrets.GIT_USER_EMAIL }}
6868
commit_author: ${{ secrets.GIT_USER_NAME }} <${{ secrets.GIT_USER_EMAIL }}>
69-
validate:
70-
name: Validate paths and links
71-
needs: commit
72-
runs-on: ubuntu-latest
73-
timeout-minutes: 30
74-
steps:
75-
- name: Checkout
76-
uses: actions/checkout@v4
77-
with:
78-
ref: ${{ github.head_ref }}
79-
- name: Setup
80-
uses: ./.github/actions/setup
81-
- name: Validate SUMMARY.md paths
82-
run: npm run validate-paths
83-
- name: Validate cross-site links
84-
run: npm run validate-links
85-
- name: Validate all pages are in SUMMARY.md
86-
run: npm run validate-orphan-pages
87-
- name: Validate redirect targets
88-
run: npm run validate-redirects

codegen/validate-links.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function findSiteSection(filePath: string): SiteSection | undefined {
1313
}
1414

1515
const absoluteUrlPattern = new RegExp(
16-
`${baseUrl.replaceAll('.', '\\.')}[^)"\\s]+`,
16+
`${baseUrl.replaceAll('.', '\\.')}[^)"<>\\s]+`,
1717
'g',
1818
)
1919

0 commit comments

Comments
 (0)