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
+ if : github.repository_owner == 'viamrobotics'
15
+ runs-on : ubuntu-latest
16
+ container :
17
+ image : ghcr.io/viamrobotics/canon:amd64
18
+ steps :
19
+ - name : Checkout Code
20
+ uses : actions/checkout@v4
21
+
22
+ - name : Build + Pack
23
+ run : |
24
+ sudo chown -R testbot .
25
+ sudo -u testbot bash -lc 'make build pack'
26
+
27
+ - name : Test HTML
28
+ # https://github.com/wjdp/htmltest-action/
29
+ # Don't fail the build on broken links
30
+ continue-on-error : false
31
+ uses : wjdp/htmltest-action@master
32
+ with :
33
+ config : .htmltest.yml
34
+ - name : Archive htmltest results
35
+ uses : actions/upload-artifact@v4
36
+ # Note: Set ACTIONS_RUNTIME_TOKEN env variable to test with nektos/act
37
+ with :
38
+ name : htmltest-report
39
+ path : tmp/.htmltest/htmltest.log
40
+ retention-days : 7 # Default is 90 days
41
+ - name : Login to Jira
42
+ if : failure()
43
+ uses : atlassian/gajira-login@v3
44
+ env :
45
+ JIRA_BASE_URL : ${{ secrets.JIRA_BASE_URL }}
46
+ JIRA_USER_EMAIL : ${{ secrets.JIRA_USER_EMAIL }}
47
+ JIRA_API_TOKEN : ${{ secrets.JIRA_API_TOKEN }}
48
+ - name : Create Jira ticket
49
+ if : failure()
50
+ id : create
51
+ uses : atlassian/gajira-create@v3
52
+ env :
53
+ GITHUB_RUN_ID : ${{ github.run_id }}
54
+ with :
55
+ project : DOCS
56
+ issuetype : Bug
57
+ summary : Broken link detected in TS docs
58
+ description : " For more info see https://github.com/viamrobotics/viam-typsescript-sdk/actions/runs/${{ env.GITHUB_RUN_ID }}."
59
+ - name : Log created Jira issue
60
+ if : failure()
61
+ run : echo "Issue ${{ steps.create.outputs.issue }} was created"
0 commit comments