-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DOCS-1484: Run htmltest on external links weekly (#2648)
- Loading branch information
Showing
4 changed files
with
102 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: Failed htmltest | ||
assignees: npentrel | ||
labels: bug | ||
--- | ||
|
||
See [the action log](https://github.com/{{ env.GITHUB_ACTION_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}) for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# .github/workflows/run-htmltest.yml | ||
# (c) 2021 Robb Romans | ||
# | ||
# Run htmltest link checker on generated HTML output in dist/ | ||
# https://github.com/wjdp/htmltest | ||
# | ||
name: run-htmltest | ||
concurrency: | ||
group: pullrequest-untrusted-htmltest-${{ github.event.number }} | ||
cancel-in-progress: true | ||
on: pull_request | ||
jobs: | ||
htmltest: | ||
runs-on: ubuntu-large | ||
container: | ||
image: ghcr.io/viamrobotics/canon:amd64 | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: true # Fetch Hugo themes | ||
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | ||
- name: Set up Hugo | ||
uses: peaceiris/actions-hugo@v2 | ||
with: | ||
hugo-version: "latest" | ||
extended: true | ||
|
||
- name: Build | ||
run: make build-dist | ||
|
||
- name: Test HTML for local pages | ||
# https://github.com/wjdp/htmltest-action/ | ||
# Don't fail the build on broken links | ||
continue-on-error: false | ||
uses: wjdp/htmltest-action@master | ||
with: | ||
# For consistency, use the same config file as for local builds | ||
config: .htmltest-local.yml | ||
- name: Archive htmltest results | ||
uses: actions/upload-artifact@v3 | ||
# Note: Set ACTIONS_RUNTIME_TOKEN env variable to test with nektos/act | ||
with: | ||
name: htmltest-report | ||
path: tmp/.htmltest/htmltest.log | ||
retention-days: 7 # Default is 90 days |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,11 +4,11 @@ | |
# Run htmltest link checker on generated HTML output in dist/ | ||
# https://github.com/wjdp/htmltest | ||
# | ||
name: run-htmltest | ||
concurrency: | ||
group: pullrequest-untrusted-htmltest-${{ github.event.number }} | ||
cancel-in-progress: true | ||
on: pull_request | ||
name: run-htmltest-external | ||
on: | ||
schedule: | ||
# 10am UTC on weekdays | ||
- cron: '0 10 * * 1,2,3,4,5' | ||
jobs: | ||
htmltest: | ||
runs-on: ubuntu-large | ||
|
@@ -44,3 +44,10 @@ jobs: | |
name: htmltest-report | ||
path: tmp/.htmltest/htmltest.log | ||
retention-days: 7 # Default is 90 days | ||
- name: Create issue about failure | ||
if: failure() | ||
uses: JasonEtco/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
filename: .github/failed-action-issue-template.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
DirectoryPath: "dist" | ||
EnforceHTTPS: true | ||
IgnoreEmptyHref: true | ||
IgnoreInternalEmptyHash: true | ||
IgnoreDirectoryMissingTrailingSlash: false | ||
IgnoreURLs: | ||
- "example.com" | ||
- "^/misc/js/script.js$" | ||
- "linkedin.com" | ||
- "app.viam.com" | ||
- "beaglebone.local" | ||
- "instagram.com" | ||
- "twitter.com" | ||
- "github.com/viamrobotics/docs" | ||
- "openai.com" | ||
- "espressif.com" | ||
- "pinout.xyz" | ||
- "play.google.com" | ||
- "scuttlerobot.org" | ||
- "numato.com" | ||
- "nvidia.com" | ||
- "slamtec.com" | ||
- "universal-robots.com" | ||
- "digikey.com" | ||
- "ufactory.cc" | ||
- "medium.com" | ||
- "radxa.com" | ||
- "electronics-tutorials.ws" | ||
- "marketplace.visualstudio.com" | ||
- "chrome.google.com" | ||
- "raspberrypi.com" | ||
- "grabcad.com" | ||
IgnoreDirs: | ||
- "lib" | ||
CacheExpires: "6h" | ||
# IgnoreDirs: - if we need to ever ignore files | ||
IgnoreExternalBrokenLinks: true |