Skip to content

Commit c785b5e

Browse files
authored
Add broken link check workflow (opensearch-project#37)
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
1 parent 3d5af70 commit c785b5e

File tree

11 files changed

+45
-22
lines changed

11 files changed

+45
-22
lines changed
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Link Checker
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
6+
branches: [main]
7+
8+
jobs:
9+
linkchecker:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: lychee Link Checker
15+
id: lychee
16+
uses: lycheeverse/lychee-action@master
17+
with:
18+
args: --accept=200,403,429 --exclude=localhost "**/*.html" "**/*.md" "**/*.txt" "**/*.json"
19+
env:
20+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
21+
- name: Fail if there were link errors
22+
run: exit ${{ steps.lychee.outputs.exit_code }}

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[![Unit tests](https://github.com/opensearch-project/anomaly-detection-dashboards-plugin/workflows/Unit%20tests%20workflow/badge.svg)](https://github.com/opensearch-project/anomaly-detection-dashboards-plugin/actions?query=workflow%3A%22Unit+tests+workflow%22)
22
[![Integration tests](https://github.com/opensearch-project/anomaly-detection-dashboards-plugin/workflows/E2E%20tests%20workflow/badge.svg)](https://github.com/opensearch-project/anomaly-detection-dashboards-plugin/actions?query=workflow%3A%22E2E+tests+workflow%22)
33
[![codecov](https://codecov.io/gh/opensearch-project/anomaly-detection-dashboards-plugin/branch/main/graph/badge.svg)](https://codecov.io/gh/opensearch-project/anomaly-detection-dashboards-plugin)
4-
[![Documentation](https://img.shields.io/badge/doc-reference-blue)](https://docs-beta.opensearch.org/docs/ad/)
4+
[![Documentation](https://img.shields.io/badge/doc-reference-blue)](https://docs-beta.opensearch.org/monitoring-plugins/ad/index/)
55
[![Forum](https://img.shields.io/badge/chat-on%20forums-blue)](https://discuss.opendistrocommunity.dev/c/Use-this-category-for-all-questions-around-machine-learning-plugins)
66
![PRs welcome!](https://img.shields.io/badge/PRs-welcome!-success)
77

@@ -22,7 +22,7 @@ You should use the plugin with the same version of the [OpenSearch Alerting Dash
2222

2323
## Documentation
2424

25-
Please see our [documentation](https://docs-beta.opensearch.org/docs/ad).
25+
Please see our [documentation](https://docs-beta.opensearch.org/monitoring-plugins/ad/index/).
2626

2727
## Setup
2828

public/pages/AnomalyCharts/components/AlertsFlyout/__tests__/__snapshots__/AlertsFlyout.test.tsx.snap

+6-6
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ exports[`<AlertsFlyout /> spec Alerts Flyout renders component with monitor 1`]
7878
Anomaly detector alerts are powered by the
7979
<a
8080
class="euiLink euiLink--primary"
81-
href="https://docs-beta.opensearch.org/docs/alerting"
81+
href="https://docs-beta.opensearch.org/monitoring-plugins/ad/index//alerting"
8282
rel="noreferrer"
8383
>
8484
@@ -98,7 +98,7 @@ exports[`<AlertsFlyout /> spec Alerts Flyout renders component with monitor 1`]
9898
Alerting in your navigation panel,
9999
<a
100100
class="euiLink euiLink--primary"
101-
href="https://docs-beta.opensearch.org/docs/opensearch/install/plugins/#alerting"
101+
href="https://docs-beta.opensearch.org/monitoring-plugins/ad/index//opensearch/install/plugins/#alerting"
102102
rel="noreferrer"
103103
>
104104
@@ -217,7 +217,7 @@ exports[`<AlertsFlyout /> spec Alerts Flyout renders component with monitor 1`]
217217
<a
218218
class="euiButton euiButton--primary"
219219
data-test-subj="setUpAlerts"
220-
href="https://docs-beta.opensearch.org/docs/alerting"
220+
href="https://docs-beta.opensearch.org/monitoring-plugins/ad/index//alerting"
221221
rel="noopener noreferrer"
222222
target="_blank"
223223
>
@@ -363,7 +363,7 @@ exports[`<AlertsFlyout /> spec Alerts Flyout renders component with undefined mo
363363
Anomaly detector alerts are powered by the
364364
<a
365365
class="euiLink euiLink--primary"
366-
href="https://docs-beta.opensearch.org/docs/alerting"
366+
href="https://docs-beta.opensearch.org/monitoring-plugins/ad/index//alerting"
367367
rel="noreferrer"
368368
>
369369
@@ -388,7 +388,7 @@ exports[`<AlertsFlyout /> spec Alerts Flyout renders component with undefined mo
388388
Alerting in your navigation panel,
389389
<a
390390
class="euiLink euiLink--primary"
391-
href="https://docs-beta.opensearch.org/docs/opensearch/install/plugins/#alerting"
391+
href="https://docs-beta.opensearch.org/monitoring-plugins/ad/index//opensearch/install/plugins/#alerting"
392392
rel="noreferrer"
393393
>
394394
@@ -507,7 +507,7 @@ exports[`<AlertsFlyout /> spec Alerts Flyout renders component with undefined mo
507507
<a
508508
class="euiButton euiButton--primary"
509509
data-test-subj="setUpAlerts"
510-
href="https://docs-beta.opensearch.org/docs/alerting"
510+
href="https://docs-beta.opensearch.org/monitoring-plugins/ad/index//alerting"
511511
rel="noopener noreferrer"
512512
target="_blank"
513513
>

public/pages/CreateHistoricalDetector/components/Configuration/__tests__/__snapshots__/Configuration.test.tsx.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ exports[`<Configuration /> spec renders the component in create mode with existi
222222
223223
<a
224224
class="euiLink euiLink--primary"
225-
href="https://docs-beta.opensearch.org/docs/ad"
225+
href="https://docs-beta.opensearch.org/monitoring-plugins/ad/index//ad"
226226
rel="noopener noreferrer"
227227
target="_blank"
228228
>
@@ -703,7 +703,7 @@ exports[`<Configuration /> spec renders the component in edit mode without exist
703703
704704
<a
705705
class="euiLink euiLink--primary"
706-
href="https://docs-beta.opensearch.org/docs/ad"
706+
href="https://docs-beta.opensearch.org/monitoring-plugins/ad/index//ad"
707707
rel="noopener noreferrer"
708708
target="_blank"
709709
>

public/pages/CreateHistoricalDetector/components/Configuration/components/__tests__/__snapshots__/Features.test.tsx.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ exports[`<Features /> spec renders the component with no given features 1`] = `
3131
3232
<a
3333
class="euiLink euiLink--primary"
34-
href="https://docs-beta.opensearch.org/docs/ad"
34+
href="https://docs-beta.opensearch.org/monitoring-plugins/ad/index//ad"
3535
rel="noopener noreferrer"
3636
target="_blank"
3737
>
@@ -145,7 +145,7 @@ exports[`<Features /> spec renders the component with one feature 1`] = `
145145
146146
<a
147147
class="euiLink euiLink--primary"
148-
href="https://docs-beta.opensearch.org/docs/ad"
148+
href="https://docs-beta.opensearch.org/monitoring-plugins/ad/index//ad"
149149
rel="noopener noreferrer"
150150
target="_blank"
151151
>

public/pages/CreateHistoricalDetector/containers/__tests__/__snapshots__/CreateHistoricalDetector.test.tsx.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@ exports[`<CreateHistoricalDetector /> spec create historical detector renders th
813813
814814
<a
815815
class="euiLink euiLink--primary"
816-
href="https://docs-beta.opensearch.org/docs/ad"
816+
href="https://docs-beta.opensearch.org/monitoring-plugins/ad/index//ad"
817817
rel="noopener noreferrer"
818818
target="_blank"
819819
>
@@ -2271,7 +2271,7 @@ exports[`<CreateHistoricalDetector /> spec edit historical detector renders the
22712271
22722272
<a
22732273
class="euiLink euiLink--primary"
2274-
href="https://docs-beta.opensearch.org/docs/ad"
2274+
href="https://docs-beta.opensearch.org/monitoring-plugins/ad/index//ad"
22752275
rel="noopener noreferrer"
22762276
target="_blank"
22772277
>

public/pages/Dashboard/Components/EmptyDashboard/__tests__/__snapshots__/EmptyDashboard.test.tsx.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ exports[`<EmptyDetector /> spec Empty results renders component with empty messa
2929
3030
<a
3131
class="euiLink euiLink--primary"
32-
href="https://docs-beta.opensearch.org/docs/ad"
32+
href="https://docs-beta.opensearch.org/monitoring-plugins/ad/index//ad"
3333
rel="noopener noreferrer"
3434
target="_blank"
3535
>

public/pages/EditFeatures/components/CategoryField/__tests__/__snapshots__/CategoryField.test.tsx.snap

+4-4
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ exports[`<CategoryField /> spec hides callout if component is loading 1`] = `
4848
4949
<a
5050
class="euiLink euiLink--primary"
51-
href="https://docs-beta.opensearch.org/docs/ad"
51+
href="https://docs-beta.opensearch.org/monitoring-plugins/ad/index//ad"
5252
rel="noopener noreferrer"
5353
target="_blank"
5454
>
@@ -177,7 +177,7 @@ exports[`<CategoryField /> spec renders the component when disabled 1`] = `
177177
178178
<a
179179
class="euiLink euiLink--primary"
180-
href="https://docs-beta.opensearch.org/docs/ad"
180+
href="https://docs-beta.opensearch.org/monitoring-plugins/ad/index//ad"
181181
rel="noopener noreferrer"
182182
target="_blank"
183183
>
@@ -297,7 +297,7 @@ exports[`<CategoryField /> spec renders the component when enabled 1`] = `
297297
298298
<a
299299
class="euiLink euiLink--primary"
300-
href="https://docs-beta.opensearch.org/docs/ad"
300+
href="https://docs-beta.opensearch.org/monitoring-plugins/ad/index//ad"
301301
rel="noopener noreferrer"
302302
target="_blank"
303303
>
@@ -517,7 +517,7 @@ exports[`<CategoryField /> spec shows callout when there are no available catego
517517
518518
<a
519519
class="euiLink euiLink--primary"
520-
href="https://docs-beta.opensearch.org/docs/ad"
520+
href="https://docs-beta.opensearch.org/monitoring-plugins/ad/index//ad"
521521
rel="noopener noreferrer"
522522
target="_blank"
523523
>

public/pages/SampleData/components/SampleDataCallout/__tests__/__snapshots__/SampleDataCallout.test.tsx.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ exports[`<SampleDataCallout /> spec Data not loaded renders component 1`] = `
3131
3232
<a
3333
class="euiLink euiLink--primary"
34-
href="https://docs-beta.opensearch.org/docs/ad"
34+
href="https://docs-beta.opensearch.org/monitoring-plugins/ad/index//ad"
3535
rel="noopener noreferrer"
3636
target="_blank"
3737
>

public/pages/createDetector/containers/__tests__/__snapshots__/CreateDetector.test.tsx.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ exports[`<CreateDetector /> spec create detector renders the component 1`] = `
4343
4444
<a
4545
class="euiLink euiLink--primary"
46-
href="https://docs-beta.opensearch.org/docs/ad"
46+
href="https://docs-beta.opensearch.org/monitoring-plugins/ad/index//ad"
4747
rel="noopener noreferrer"
4848
target="_blank"
4949
>

public/utils/constants.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ export const ANOMALY_DETECTORS_INDEX = '.opendistro-anomaly-detectors';
7676

7777
export const ANOMALY_RESULT_INDEX = '.opendistro-anomaly-results';
7878

79-
export const BASE_DOCS_LINK = 'https://docs-beta.opensearch.org/docs';
79+
export const BASE_DOCS_LINK =
80+
'https://docs-beta.opensearch.org/monitoring-plugins/ad/index/';
8081

8182
export const MAX_DETECTORS = 1000;
8283

0 commit comments

Comments
 (0)