Skip to content

Commit b70a29c

Browse files
committed
DOCS-3812: Add htmlcheck to TS docs
1 parent f7f862d commit b70a29c

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
lines changed

.github/workflows/linkcheck.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# .github/workflows/run-htmltest.yml
2+
# (c) 2021 Robb Romans
3+
#
4+
# Run htmltest link checker on generated HTML output in dist/
5+
# https://github.com/wjdp/htmltest
6+
#
7+
name: run-htmltest-external
8+
on:
9+
schedule:
10+
# 10am UTC on Mondays
11+
- cron: "0 10 * * 1"
12+
jobs:
13+
htmltest:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout Code
17+
uses: actions/checkout@v4
18+
19+
- name: Generate docs
20+
run: make build-docs
21+
22+
- name: Test HTML
23+
# https://github.com/wjdp/htmltest-action/
24+
# Don't fail the build on broken links
25+
continue-on-error: false
26+
uses: wjdp/htmltest-action@master
27+
with:
28+
config: .htmltest.yml
29+
- name: Archive htmltest results
30+
uses: actions/upload-artifact@v4
31+
# Note: Set ACTIONS_RUNTIME_TOKEN env variable to test with nektos/act
32+
with:
33+
name: htmltest-report
34+
path: tmp/.htmltest/htmltest.log
35+
retention-days: 7 # Default is 90 days
36+
- name: Login to Jira
37+
if: failure()
38+
uses: atlassian/gajira-login@v3
39+
env:
40+
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
41+
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
42+
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
43+
- name: Create Jira ticket
44+
if: failure()
45+
id: create
46+
uses: atlassian/gajira-create@v3
47+
env:
48+
GITHUB_RUN_ID: ${{ github.run_id }}
49+
with:
50+
project: DOCS
51+
issuetype: Bug
52+
summary: Broken link detected
53+
description: "For more info see https://github.com/viamrobotics/viam-python-sdk/actions/runs/${{ env.GITHUB_RUN_ID }}."
54+
- name: Log created Jira issue
55+
if: failure()
56+
run: echo "Issue ${{ steps.create.outputs.issue }} was created"

.htmltest.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
DirectoryPath: "docs/dist"
2+
EnforceHTTPS: true
3+
IgnoreEmptyHref: true
4+
IgnoreInternalEmptyHash: true
5+
IgnoreDirectoryMissingTrailingSlash: false
6+
IgnoreURLs:
7+
- "app.viam.com"
8+
IgnoreDirs:
9+
- "lib"
10+
CacheExpires: "6h"
11+
# IgnoreDirs: - if we need to ever ignore files
12+
CheckInternal: false
13+
CheckDoctype: false
14+
CheckScripts: false
15+
FileExtension: ".html"

0 commit comments

Comments
 (0)