Skip to content

Commit 1265cde

Browse files
authored
build: fix a couple of links and add linkator to check all broken links 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]>
1 parent 2f16d5a commit 1265cde

File tree

9 files changed

+71
-201
lines changed

9 files changed

+71
-201
lines changed

.github/workflows/build-docs.yml

Lines changed: 0 additions & 54 deletions
This file was deleted.

.github/workflows/delete_old_packages.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/deployment.yml

Lines changed: 0 additions & 54 deletions
This file was deleted.

.github/workflows/link-check.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Check Broken Links
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ main ] # Runs on push to main branch
7+
schedule:
8+
- cron: "0 12 * * 1" # Runs every Monday at 12:00 UTC
9+
10+
jobs:
11+
check-links:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
with:
17+
sparse-checkout: .linkinatorrc.json
18+
sparse-checkout-cone-mode: false
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: "18"
24+
25+
- name: Wait for GitHub Pages deployment
26+
run: sleep 60s # Delay to allow deployment to complete
27+
28+
- name: Get short SHA
29+
run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
30+
31+
- name: Check links on the live site
32+
run: |
33+
echo "Commit SHA: $SHORT_SHA"
34+
npx linkinator https://hyperledger-identus.github.io/docs/ --config .linkinatorrc.json --format text
35+
npx linkinator https://hyperledger-identus.github.io/docs/ --config .linkinatorrc.json > link-check-results.json
36+
37+
- name: Upload Linkinator output
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: linkinator-results-${{ env.SHORT_SHA }}
41+
path: link-check-results.txt

.github/workflows/release-gh-pages.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ on:
1414
- "gh-pages"
1515
push:
1616
branches: [main]
17-
tags: ["v*"]
1817

1918
jobs:
2019
ghpages:
@@ -37,7 +36,7 @@ jobs:
3736
yarn build
3837
3938
- name: Deploy
40-
if: (inputs.force_deploy_ghpages == true) || (github.ref == 'refs/heads/main') || startsWith(github.ref, 'refs/tags/v')
39+
if: (inputs.force_deploy_ghpages == true) || (github.ref == 'refs/heads/main')
4140
# https://github.com/marketplace/actions/github-pages-action
4241
uses: peaceiris/actions-gh-pages@v3
4342
with:

.github/workflows/release.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

.linkinatorrc.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"recurse": true,
3+
"concurrency": 10,
4+
"format": "JSON",
5+
"verbosity": "info",
6+
"timeout": 30000,
7+
"skip": [
8+
"https://example.org/*",
9+
"https://example.com/*",
10+
"https://example-verifier.com/*",
11+
"https://my.domain.com/*",
12+
"http://issuer-agent.com/*",
13+
"https://didcomm.org/*",
14+
"http://localhost*",
15+
"https://host.docker.internal*"
16+
]
17+
}

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ This website is built using [Docusaurus 2](https://docusaurus.io/).
2020
* etc.
2121

2222
## `sdk`: SDKs documentation
23-
* enterprise-sdk
24-
* wallet-sdk
23+
* sdk-ts
24+
* sdk-swift
25+
* sdk-kmp
2526

2627
## `api`: autogenerated docs from OpenAPI specs
2728
`documentation/api` directory contains auto-generated documentation for RestAPI endpoints provided by Identus executables, it's auto-generated and should not be added manually.
@@ -40,7 +41,7 @@ brew install yarn
4041

4142
# Create new projects directory
4243
cd ~ && mkdir projects && cd projects
43-
git clone https://github.com/hyperledger/identus-docs.git
44+
git clone https://github.com/hyperledger-identus/docs.git
4445
# Initialize submodules
4546
git submodule init
4647
# Update submodules
@@ -50,7 +51,7 @@ git submodule update --remote --recursive
5051
# git checkout feature-branch
5152

5253
# Deploy local version of the website
53-
cd identus-docs
54+
cd docs
5455
yarn install
5556
yarn start
5657
```
@@ -70,3 +71,9 @@ $ yarn build --out-dir infra/website
7071
```
7172

7273
This command creates a set of static resources which can be hosted to serve the full site.
74+
75+
## Run [linkinator](https://github.com/JustinBeckwith/linkinator) locally to check the broken links of the live website
76+
77+
```shell
78+
$ npx linkinator https://hyperledger-identus.github.io/docs/ --config .linkinatorrc.json --format text
79+
```

documentation/home/identus/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ Identus is a toolset designed for Decentralized Identity enablement. These tools
88

99
* [Mediator](mediator): The Mediator acts as a bridge between the [holder's](/home/concepts/glossary#holder) device and other actors, such as [issuers](/home/concepts/glossary#issuer) and [verifiers](/home/concepts/glossary#verifier), ensuring secure and reliable communication without centralized management​​​​.
1010

11-
* Edge Agent SDKs: allow the development of edge agents - Decentralized Identity mobile apps and browser extensions. The SDKs are available in [Swift](https://hyperledger-identus.github.io/edge-agent-sdk-swift/documentation/edgeagentsdk/) (iOS and other Apple OS), [TS](https://hyperledger-identus.github.io/docs/sdk-ts/sdk) (Browser and Node.js), and [Kotlin Multiplatform](https://hyperledger-identus.github.io/edge-agent-sdk-kmp/) (JVM and Android)
11+
* Edge Agent SDKs: allow the development of edge agents - Decentralized Identity mobile apps and browser extensions. The SDKs are available in [Swift](https://hyperledger-identus.github.io/sdk-swift/documentation/edgeagentsdk/) (iOS and other Apple OS), [TS](https://hyperledger-identus.github.io/docs/sdk-ts/sdk) (Browser and Node.js), and [Kotlin Multiplatform](https://hyperledger-identus.github.io/sdk-kmp/) (JVM and Android)

0 commit comments

Comments
 (0)