Skip to content

Commit

Permalink
build: fix a couple of links and add linkator to check all broken lin…
Browse files Browse the repository at this point in the history
…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
yshyn-iohk authored Feb 18, 2025
1 parent 2f16d5a commit 1265cde
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 201 deletions.
54 changes: 0 additions & 54 deletions .github/workflows/build-docs.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/delete_old_packages.yml

This file was deleted.

54 changes: 0 additions & 54 deletions .github/workflows/deployment.yml

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/link-check.yml
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
3 changes: 1 addition & 2 deletions .github/workflows/release-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ on:
- "gh-pages"
push:
branches: [main]
tags: ["v*"]

jobs:
ghpages:
Expand All @@ -37,7 +36,7 @@ jobs:
yarn build
- name: Deploy
if: (inputs.force_deploy_ghpages == true) || (github.ref == 'refs/heads/main') || startsWith(github.ref, 'refs/tags/v')
if: (inputs.force_deploy_ghpages == true) || (github.ref == 'refs/heads/main')
# https://github.com/marketplace/actions/github-pages-action
uses: peaceiris/actions-gh-pages@v3
with:
Expand Down
60 changes: 0 additions & 60 deletions .github/workflows/release.yml

This file was deleted.

17 changes: 17 additions & 0 deletions .linkinatorrc.json
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*"
]
}
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ This website is built using [Docusaurus 2](https://docusaurus.io/).
* etc.

## `sdk`: SDKs documentation
* enterprise-sdk
* wallet-sdk
* sdk-ts
* sdk-swift
* sdk-kmp

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

# Create new projects directory
cd ~ && mkdir projects && cd projects
git clone https://github.com/hyperledger/identus-docs.git
git clone https://github.com/hyperledger-identus/docs.git
# Initialize submodules
git submodule init
# Update submodules
Expand All @@ -50,7 +51,7 @@ git submodule update --remote --recursive
# git checkout feature-branch

# Deploy local version of the website
cd identus-docs
cd docs
yarn install
yarn start
```
Expand All @@ -70,3 +71,9 @@ $ yarn build --out-dir infra/website
```

This command creates a set of static resources which can be hosted to serve the full site.

## Run [linkinator](https://github.com/JustinBeckwith/linkinator) locally to check the broken links of the live website

```shell
$ npx linkinator https://hyperledger-identus.github.io/docs/ --config .linkinatorrc.json --format text
```
2 changes: 1 addition & 1 deletion documentation/home/identus/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Identus is a toolset designed for Decentralized Identity enablement. These tools

* [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​​​​.

* 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)
* 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 comments on commit 1265cde

Please sign in to comment.