From 94cbe48c1da136ae07c81392ecb07c6c7b7875a4 Mon Sep 17 00:00:00 2001 From: Mintu Date: Thu, 8 Feb 2024 21:35:31 +0530 Subject: [PATCH 01/15] added a link-check ci --- .github/workflows/link-check.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/link-check.yml diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml new file mode 100644 index 000000000..0d1eb4839 --- /dev/null +++ b/.github/workflows/link-check.yml @@ -0,0 +1,23 @@ +name: Link Checker + +on: + push: + branches: + - main + pull_request: + types: [opened, synchronize, reopened] + workflow_dispatch: + +jobs: + linkinator: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Validate Links in Markdown Files + uses: JustinBeckwith/linkinator-action@v1 + with: + paths: "pages/blog/posts/**/*.md" + markdown: true + retry: true \ No newline at end of file From 19ec0697bc65b183387ae0f267abc273390b85dd Mon Sep 17 00:00:00 2001 From: Mintu Date: Sun, 11 Feb 2024 15:03:00 +0530 Subject: [PATCH 02/15] replace likinator with linkchecker --- .github/workflows/link-check.yml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml index 0d1eb4839..3feb457d2 100644 --- a/.github/workflows/link-check.yml +++ b/.github/workflows/link-check.yml @@ -1,23 +1,16 @@ -name: Link Checker +name: Links (Fail Fast) on: push: - branches: - - main pull_request: - types: [opened, synchronize, reopened] - workflow_dispatch: jobs: - linkinator: + linkChecker: runs-on: ubuntu-latest steps: - - name: Checkout Repository - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Validate Links in Markdown Files - uses: JustinBeckwith/linkinator-action@v1 + - name: Link Checker + uses: lycheeverse/lychee-action@v1.9.0 with: - paths: "pages/blog/posts/**/*.md" - markdown: true - retry: true \ No newline at end of file + fail: true \ No newline at end of file From 49c043b58d552c490464eec9239e6c24682348e3 Mon Sep 17 00:00:00 2001 From: Mintu Date: Sun, 11 Feb 2024 15:24:44 +0530 Subject: [PATCH 03/15] added .lyncheeignore --- .lycheeignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .lycheeignore diff --git a/.lycheeignore b/.lycheeignore new file mode 100644 index 000000000..d65cd0605 --- /dev/null +++ b/.lycheeignore @@ -0,0 +1 @@ +// add some link here that you dont want link-checker ci to check \ No newline at end of file From dc2a7639db7e68dd1329404878701ea47a2e8893 Mon Sep 17 00:00:00 2001 From: Mintu Date: Sun, 11 Feb 2024 15:31:25 +0530 Subject: [PATCH 04/15] added the path for the linkchecker action --- .github/workflows/link-check.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml index 3feb457d2..3466752a1 100644 --- a/.github/workflows/link-check.yml +++ b/.github/workflows/link-check.yml @@ -3,6 +3,8 @@ name: Links (Fail Fast) on: push: pull_request: + paths: + - 'pages/blog/posts/**/*.md' jobs: linkChecker: From 8ddd864aacd9a161f59144532d85baf378ec427d Mon Sep 17 00:00:00 2001 From: Mintu Date: Sun, 11 Feb 2024 15:33:32 +0530 Subject: [PATCH 05/15] cleanup --- .github/workflows/link-check.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml index 3466752a1..0cbfd0061 100644 --- a/.github/workflows/link-check.yml +++ b/.github/workflows/link-check.yml @@ -3,12 +3,11 @@ name: Links (Fail Fast) on: push: pull_request: - paths: - - 'pages/blog/posts/**/*.md' jobs: linkChecker: runs-on: ubuntu-latest + if: ${{ startsWith(github.event_path, 'pages/blog/posts/') && endsWith(github.event_path, '.md') }} steps: - uses: actions/checkout@v3 From 01dee2cd71947dad8dd463b2143099ef829cb82e Mon Sep 17 00:00:00 2001 From: Mintu Date: Sun, 11 Feb 2024 15:52:54 +0530 Subject: [PATCH 06/15] triggering the workflow --- .github/workflows/link-check.yml | 5 ++++- pages/blog/posts/bowtie-intro.md | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml index 0cbfd0061..7cd392e75 100644 --- a/.github/workflows/link-check.yml +++ b/.github/workflows/link-check.yml @@ -2,12 +2,15 @@ name: Links (Fail Fast) on: push: + paths: + - 'pages/blog/posts/**/*.md' pull_request: + paths: + - 'pages/blog/posts/**/*.md' jobs: linkChecker: runs-on: ubuntu-latest - if: ${{ startsWith(github.event_path, 'pages/blog/posts/') && endsWith(github.event_path, '.md') }} steps: - uses: actions/checkout@v3 diff --git a/pages/blog/posts/bowtie-intro.md b/pages/blog/posts/bowtie-intro.md index 111811859..6a2dd519d 100644 --- a/pages/blog/posts/bowtie-intro.md +++ b/pages/blog/posts/bowtie-intro.md @@ -45,7 +45,7 @@ Bowtie attempts to bring these ideas to JSON Schema. From the existing [list of JSON Schema implementations](https://json-schema.org/implementations.html#validators), Bowtie already [supports](https://github.com/orgs/bowtie-json-schema/packages) *12* implementations across *9* programming languages, allowing anyone to run any of these implementations and see what they have to say about schemas and instances. -It ships with a [command line program](https://bowtie-json-schema.readthedocs.io/en/latest/cli/), but perhaps more excitingly, ongoing automated runs of this CLI have been set up, such that Bowtie emits a [report across all of its supported implementations](https://bowtie-json-schema.github.io/bowtie/draft2020). +It ships with a [command line program](https://docs.bowtie.report/en/stable/cli/), but perhaps more excitingly, ongoing automated runs of this CLI have been set up, such that Bowtie emits a [report across all of its supported implementations](https://bowtie-json-schema.github.io/bowtie/draft2020). To produce this report, Bowtie runs the [official JSON Schema Test Suite](https://github.com/json-schema-org/JSON-Schema-Test-Suite), which is our existing set of tests meant to exercise compliance with the JSON Schema specifications. Many implementations already [use the suite within their own continuous integration](https://github.com/json-schema-org/JSON-Schema-Test-Suite#who-uses-the-test-suite), but this is the first time both users of JSON Schema as well as implementers can see results of running the suite in a single place, across many implementations. From a9f2cfd2565af99407bfaa3d347c39983bf5b565 Mon Sep 17 00:00:00 2001 From: Mintu Date: Sun, 11 Feb 2024 15:58:19 +0530 Subject: [PATCH 07/15] added a comment on github if the workflow fails --- .github/workflows/link-check.yml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml index 7cd392e75..73e34aabd 100644 --- a/.github/workflows/link-check.yml +++ b/.github/workflows/link-check.yml @@ -1,20 +1,16 @@ -name: Links (Fail Fast) +name: Check Links on: - push: - paths: - - 'pages/blog/posts/**/*.md' pull_request: - paths: - - 'pages/blog/posts/**/*.md' + types: [opened, synchronize, reopened] jobs: - linkChecker: + check-links: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - - name: Link Checker - uses: lycheeverse/lychee-action@v1.9.0 + - uses: actions/checkout@v2 + - uses: lycheeverse/lychee-action@v1 + - name: Comment Broken Links + uses: marocchino/sticky-pull-request-comment@v2 with: - fail: true \ No newline at end of file + path: lychee/out.md \ No newline at end of file From 7607ac6826cac3e7b5a849ddfb17812370cf1907 Mon Sep 17 00:00:00 2001 From: Mintu Date: Sun, 11 Feb 2024 16:07:42 +0530 Subject: [PATCH 08/15] specified the path --- .github/workflows/link-check.yml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml index 73e34aabd..13dddf582 100644 --- a/.github/workflows/link-check.yml +++ b/.github/workflows/link-check.yml @@ -1,16 +1,22 @@ -name: Check Links +name: check Links on: + push: + paths: + - 'pages/blog/posts/**/*.md' + pull_request: - types: [opened, synchronize, reopened] + paths: + - 'pages/blog/posts/**/*.md' jobs: - check-links: + linkChecker: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: lycheeverse/lychee-action@v1 - - name: Comment Broken Links - uses: marocchino/sticky-pull-request-comment@v2 + - uses: actions/checkout@v3 + + - name: Link Checker + uses: lycheeverse/lychee-action@v1.9.0 with: - path: lychee/out.md \ No newline at end of file + fail: true + args: '--base . --verbose --no-progress pages/blog/posts/**/*.md' From 3677dfe1d87493beb7328071b815440013616a6c Mon Sep 17 00:00:00 2001 From: Mintu Date: Fri, 23 Feb 2024 11:46:07 +0530 Subject: [PATCH 09/15] added the build process --- .github/workflows/link-check.yml | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml index 13dddf582..de526758f 100644 --- a/.github/workflows/link-check.yml +++ b/.github/workflows/link-check.yml @@ -1,17 +1,39 @@ -name: check Links +name: Build and check Links on: push: paths: - - 'pages/blog/posts/**/*.md' + - main pull_request: paths: - - 'pages/blog/posts/**/*.md' + - main jobs: + build_and_serve: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install Dependencies + run: yarn install + + - name: Build Next.js App + run: yarn build + + - name: Serve App Locally + run: yarn start & + linkChecker: runs-on: ubuntu-latest + needs: build_and_serve steps: - uses: actions/checkout@v3 @@ -19,4 +41,6 @@ jobs: uses: lycheeverse/lychee-action@v1.9.0 with: fail: true - args: '--base . --verbose --no-progress pages/blog/posts/**/*.md' + args: '--base http://localhost:3000 --verbose --no-progress **/*.md' + +# we should add here deployment steps here \ No newline at end of file From e5e76c3110db5c3e63d665468981df6dec74a0e1 Mon Sep 17 00:00:00 2001 From: Mintu Date: Fri, 23 Feb 2024 11:54:36 +0530 Subject: [PATCH 10/15] corrected the path of the workflow --- .github/workflows/link-check.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml index de526758f..363a86738 100644 --- a/.github/workflows/link-check.yml +++ b/.github/workflows/link-check.yml @@ -2,12 +2,11 @@ name: Build and check Links on: push: - paths: + branches: - main pull_request: - paths: - - main + types: [opened, synchronize, reopened] jobs: build_and_serve: @@ -31,11 +30,14 @@ jobs: - name: Serve App Locally run: yarn start & + - name: Wait for App to Start + run: sleep 20 + linkChecker: runs-on: ubuntu-latest needs: build_and_serve steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Link Checker uses: lycheeverse/lychee-action@v1.9.0 From c7006e20f2f95dffcb225110e6ad58eb0783b1eb Mon Sep 17 00:00:00 2001 From: Mintu Gogoi Date: Mon, 4 Mar 2024 11:34:39 +0000 Subject: [PATCH 11/15] added name and added `yarn install --frozen-lockfile` --- .github/workflows/link-check.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml index 363a86738..a1e3b1bae 100644 --- a/.github/workflows/link-check.yml +++ b/.github/workflows/link-check.yml @@ -22,7 +22,7 @@ jobs: node-version: '20' - name: Install Dependencies - run: yarn install + run: yarn install --frozen-lockfile - name: Build Next.js App run: yarn build @@ -37,7 +37,8 @@ jobs: runs-on: ubuntu-latest needs: build_and_serve steps: - - uses: actions/checkout@v4 + - name: Checkout Repository + uses: actions/checkout@v4 - name: Link Checker uses: lycheeverse/lychee-action@v1.9.0 From 366e57862ae7750e4aa789fc2111a166443a28e6 Mon Sep 17 00:00:00 2001 From: Mintu Gogoi Date: Mon, 4 Mar 2024 11:40:02 +0000 Subject: [PATCH 12/15] remove the link added --- pages/blog/posts/bowtie-intro.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/blog/posts/bowtie-intro.md b/pages/blog/posts/bowtie-intro.md index 6a2dd519d..111811859 100644 --- a/pages/blog/posts/bowtie-intro.md +++ b/pages/blog/posts/bowtie-intro.md @@ -45,7 +45,7 @@ Bowtie attempts to bring these ideas to JSON Schema. From the existing [list of JSON Schema implementations](https://json-schema.org/implementations.html#validators), Bowtie already [supports](https://github.com/orgs/bowtie-json-schema/packages) *12* implementations across *9* programming languages, allowing anyone to run any of these implementations and see what they have to say about schemas and instances. -It ships with a [command line program](https://docs.bowtie.report/en/stable/cli/), but perhaps more excitingly, ongoing automated runs of this CLI have been set up, such that Bowtie emits a [report across all of its supported implementations](https://bowtie-json-schema.github.io/bowtie/draft2020). +It ships with a [command line program](https://bowtie-json-schema.readthedocs.io/en/latest/cli/), but perhaps more excitingly, ongoing automated runs of this CLI have been set up, such that Bowtie emits a [report across all of its supported implementations](https://bowtie-json-schema.github.io/bowtie/draft2020). To produce this report, Bowtie runs the [official JSON Schema Test Suite](https://github.com/json-schema-org/JSON-Schema-Test-Suite), which is our existing set of tests meant to exercise compliance with the JSON Schema specifications. Many implementations already [use the suite within their own continuous integration](https://github.com/json-schema-org/JSON-Schema-Test-Suite#who-uses-the-test-suite), but this is the first time both users of JSON Schema as well as implementers can see results of running the suite in a single place, across many implementations. From 8f470569092f712ef86a70917025b060c7b73164 Mon Sep 17 00:00:00 2001 From: Mintu Gogoi Date: Mon, 4 Mar 2024 11:55:27 +0000 Subject: [PATCH 13/15] added git submodule --- .github/workflows/link-check.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml index a1e3b1bae..aba7f7ac4 100644 --- a/.github/workflows/link-check.yml +++ b/.github/workflows/link-check.yml @@ -39,6 +39,8 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@v4 + with: + submodules: recursive - name: Link Checker uses: lycheeverse/lychee-action@v1.9.0 From 9511807c0a68ad9ac007e63eaeed344a63baef0d Mon Sep 17 00:00:00 2001 From: Mintu Gogoi Date: Mon, 4 Mar 2024 11:57:08 +0000 Subject: [PATCH 14/15] cleanup --- .github/workflows/link-check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml index aba7f7ac4..ee9ba9f63 100644 --- a/.github/workflows/link-check.yml +++ b/.github/workflows/link-check.yml @@ -19,6 +19,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: + submodules: recursive node-version: '20' - name: Install Dependencies From 3962bb4db6128f0161c9fd0dab482336d32f3509 Mon Sep 17 00:00:00 2001 From: Mintu Gogoi Date: Mon, 4 Mar 2024 11:59:40 +0000 Subject: [PATCH 15/15] cleanups --- .github/workflows/link-check.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml index ee9ba9f63..f23450a96 100644 --- a/.github/workflows/link-check.yml +++ b/.github/workflows/link-check.yml @@ -15,11 +15,12 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@v4 + with: + submodules: recursive - name: Set up Node.js uses: actions/setup-node@v4 with: - submodules: recursive node-version: '20' - name: Install Dependencies