-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add nightly link checker. Signed-off-by: bgravenorst <[email protected]> * Apply suggestions from code review Co-authored-by: Joan E <[email protected]> Signed-off-by: Byron Gravenorst <[email protected]> --------- Signed-off-by: bgravenorst <[email protected]> Signed-off-by: Byron Gravenorst <[email protected]> Co-authored-by: Joan E <[email protected]>
- Loading branch information
1 parent
1015044
commit aef892e
Showing
2 changed files
with
115 additions
and
0 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,70 @@ | ||
{ | ||
"ignorePatterns": [ | ||
{ | ||
"pattern": "^http(s)?://localhost" | ||
}, | ||
{ | ||
"pattern": "^http(s)?://127.0.0.1" | ||
}, | ||
{ | ||
"comment": "This is a private repos", | ||
"pattern": "^http(s)?://gitlab.com/ConsenSys/" | ||
}, | ||
{ | ||
"comment": "This is a private repos", | ||
"pattern": "^http(s)?://github.com/ConsenSys/orchestrate" | ||
}, | ||
{ | ||
"comment": "This is a private repo", | ||
"pattern": "^http(s)?://github.com/INFURA/docs(?:/(issues|pulls))?" | ||
}, | ||
{ | ||
"comment": "Consensys.net now has DDoS attack protection", | ||
"pattern": "^http(s)?://consensys.net" | ||
}, | ||
{ | ||
"comment": "Exclude addresses with extra data variable placeholders (not yet replaced when checking for links)", | ||
"pattern": "{{[a-zA-Z_\\-\\.\\[\\]\\']+}}" | ||
}, | ||
{ | ||
"comment": "Exclude Infura endpoints that require an API key", | ||
"pattern": "^https?:\\/\\/[a-zA-Z0-9.-]*\\.infura\\.io\\/v3\\/.*$" | ||
}, | ||
{ | ||
"pattern": "^http(s)?://.+.zendesk.com" | ||
}, | ||
{ | ||
"pattern": "^http(s)?://.+.etherscan.io" | ||
}, | ||
{ | ||
"pattern": "^http(s)?://help.figma.com" | ||
}, | ||
{ | ||
"pattern": "^http(s)?://(docs\\.)?metamask\\.io" | ||
}, | ||
{ | ||
"comment": "Skip URLs in the redoc macro with entity", | ||
"pattern": "http(s)?://.+\\&\\#39\\;" | ||
}, | ||
{ | ||
"comment": "Skip URLs in the redoc macro with char", | ||
"pattern": "http(s)?://.+'" | ||
} | ||
], | ||
"httpHeaders": [ | ||
{ | ||
"urls": [ | ||
"https://github.com/", | ||
"https://guides.github.com/", | ||
"https://help.github.com/", | ||
"https://docs.github.com/" | ||
], | ||
"headers": { | ||
"Accept-Encoding": "zstd, br, gzip, deflate" | ||
} | ||
} | ||
], | ||
"timeout": "30s", | ||
"aliveStatusCodes": [200, 206, 403], | ||
"retryOn429": true | ||
} |
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,45 @@ | ||
--- | ||
name: Nightly check | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
workflow_dispatch: {} | ||
|
||
concurrency: | ||
group: nightly-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
linkCheck: | ||
name: Run link check | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: LinkCheck | ||
id: linkcheck | ||
uses: gaurav-nelson/github-action-markdown-link-check@v1 | ||
with: | ||
use-quiet-mode: 'yes' | ||
use-verbose-mode: 'yes' | ||
folder-path: './docs' | ||
check-modified-files-only: 'no' | ||
base-branch: main | ||
config-file: './.github/workflows/link-check.json' | ||
|
||
slackNotification: | ||
needs: linkCheck | ||
if: ${{ failure() }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Slack Notification | ||
uses: rtCamp/action-slack-notify@v2 | ||
env: | ||
SLACK_CHANNEL: doc-ci-alerts | ||
SLACK_COLOR: danger | ||
SLACK_USERNAME: ci | ||
SLACK_TITLE: Hyperledger Besu docs nightly build - Failure | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | ||
MSG_MINIMAL: true |