-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: fix a couple of links and add linkator to check all broken lin…
…ks of … (#211) * fix: a couple of links and add linkator to check all broken links of the live site Signed-off-by: Yurii Shynbuiev <[email protected]> * build: cleanup old workflows Signed-off-by: Yurii Shynbuiev <[email protected]> * docs: add instruction to run linkinator locally Signed-off-by: Yurii Shynbuiev <[email protected]> --------- Signed-off-by: Yurii Shynbuiev <[email protected]>
- Loading branch information
1 parent
2f16d5a
commit 1265cde
Showing
9 changed files
with
71 additions
and
201 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,41 @@ | ||
name: Check Broken Links | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ main ] # Runs on push to main branch | ||
schedule: | ||
- cron: "0 12 * * 1" # Runs every Monday at 12:00 UTC | ||
|
||
jobs: | ||
check-links: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
sparse-checkout: .linkinatorrc.json | ||
sparse-checkout-cone-mode: false | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "18" | ||
|
||
- name: Wait for GitHub Pages deployment | ||
run: sleep 60s # Delay to allow deployment to complete | ||
|
||
- name: Get short SHA | ||
run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | ||
|
||
- name: Check links on the live site | ||
run: | | ||
echo "Commit SHA: $SHORT_SHA" | ||
npx linkinator https://hyperledger-identus.github.io/docs/ --config .linkinatorrc.json --format text | ||
npx linkinator https://hyperledger-identus.github.io/docs/ --config .linkinatorrc.json > link-check-results.json | ||
- name: Upload Linkinator output | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: linkinator-results-${{ env.SHORT_SHA }} | ||
path: link-check-results.txt |
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
This file was deleted.
Oops, something went wrong.
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,17 @@ | ||
{ | ||
"recurse": true, | ||
"concurrency": 10, | ||
"format": "JSON", | ||
"verbosity": "info", | ||
"timeout": 30000, | ||
"skip": [ | ||
"https://example.org/*", | ||
"https://example.com/*", | ||
"https://example-verifier.com/*", | ||
"https://my.domain.com/*", | ||
"http://issuer-agent.com/*", | ||
"https://didcomm.org/*", | ||
"http://localhost*", | ||
"https://host.docker.internal*" | ||
] | ||
} |
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
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