From d352dd029eb408e6847d4695d53f5717782f5687 Mon Sep 17 00:00:00 2001
From: zaelgohary
Date: Thu, 13 Jun 2024 12:44:19 +0300
Subject: [PATCH 1/9] Add link checker workflow
---
.github/workflows/link_checker.yml | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100644 .github/workflows/link_checker.yml
diff --git a/.github/workflows/link_checker.yml b/.github/workflows/link_checker.yml
new file mode 100644
index 0000000000..ecbafc7a75
--- /dev/null
+++ b/.github/workflows/link_checker.yml
@@ -0,0 +1,22 @@
+name: Link Checker
+
+on:
+ push:
+ branches: [development, development_2.6]
+ pull_request:
+ branches: [development, development_2.6]
+
+jobs:
+ check-links:
+ runs-on: ubuntu-latest
+ name: Check for broken links
+ steps:
+ - name: Check for broken links
+ id: link-report
+ uses: elliotforbes/broken-link-checker@1.0.2
+ with:
+ url: |
+ https://dashboard.dev.grid.tf
+ https://dashboard.qa.grid.tf
+ https://dashboard.test.grid.tf
+ https://dashboard.grid.tf
\ No newline at end of file
From aca8b0d06c1c0484639bbb8f44e042ab8796c2ed Mon Sep 17 00:00:00 2001
From: zaelgohary
Date: Thu, 13 Jun 2024 12:48:42 +0300
Subject: [PATCH 2/9] Edit workflow
---
.github/workflows/link_checker.yml | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/.github/workflows/link_checker.yml b/.github/workflows/link_checker.yml
index ecbafc7a75..489173a2ad 100644
--- a/.github/workflows/link_checker.yml
+++ b/.github/workflows/link_checker.yml
@@ -7,16 +7,19 @@ on:
branches: [development, development_2.6]
jobs:
- check-links:
+ linkChecker:
runs-on: ubuntu-latest
- name: Check for broken links
steps:
- - name: Check for broken links
- id: link-report
- uses: elliotforbes/broken-link-checker@1.0.2
+ - uses: actions/checkout@v4
+
+ - name: Link Checker
+ id: lychee
+ uses: lycheeverse/lychee-action@v1
+
+ - name: Create Issue From File
+ if: env.lychee_exit_code != 0
+ uses: peter-evans/create-issue-from-file@v4
with:
- url: |
- https://dashboard.dev.grid.tf
- https://dashboard.qa.grid.tf
- https://dashboard.test.grid.tf
- https://dashboard.grid.tf
\ No newline at end of file
+ title: Link Checker Report
+ content-filepath: ./lychee/out.md
+ labels: report, automated issue
\ No newline at end of file
From bd6b485876c31675206f1bf046fabef328a5a78c Mon Sep 17 00:00:00 2001
From: zaelgohary
Date: Thu, 13 Jun 2024 13:02:55 +0300
Subject: [PATCH 3/9] Edit workflow
---
.github/workflows/link_checker.yml | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/link_checker.yml b/.github/workflows/link_checker.yml
index 489173a2ad..93bf8a7516 100644
--- a/.github/workflows/link_checker.yml
+++ b/.github/workflows/link_checker.yml
@@ -7,7 +7,7 @@ on:
branches: [development, development_2.6]
jobs:
- linkChecker:
+ check-links-and-create-issue:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -15,11 +15,19 @@ jobs:
- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v1
+ with:
+ args: --output lychee/out.md
+ continue-on-error: true
+
+ - name: Set Exit Code
+ run: echo "::set-output name=lychee_exit_code::${{ steps.lychee.outcome }}"
+ id: set-exit-code
- - name: Create Issue From File
- if: env.lychee_exit_code != 0
+ - name: Create Issue
+ if: steps.set-exit-code.outputs.lychee_exit_code != 'success'
uses: peter-evans/create-issue-from-file@v4
with:
- title: Link Checker Report
+ title: "${{ github.workflow }}: some links are broken"
+ token: ${{ github.token }}
content-filepath: ./lychee/out.md
- labels: report, automated issue
\ No newline at end of file
+ labels: link_checker
\ No newline at end of file
From 189193bc8bcc439e66e087978215f753508fc06f Mon Sep 17 00:00:00 2001
From: zaelgohary
Date: Thu, 13 Jun 2024 13:11:02 +0300
Subject: [PATCH 4/9] Test workflow
---
.github/workflows/link_checker.yml | 4 ++--
packages/playground/src/components/connect_wallet_landing.vue | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/link_checker.yml b/.github/workflows/link_checker.yml
index 93bf8a7516..f5a8d4eb03 100644
--- a/.github/workflows/link_checker.yml
+++ b/.github/workflows/link_checker.yml
@@ -27,7 +27,7 @@ jobs:
if: steps.set-exit-code.outputs.lychee_exit_code != 'success'
uses: peter-evans/create-issue-from-file@v4
with:
- title: "${{ github.workflow }}: some links are broken"
+ title: "${{ github.workflow }}: Some links are broken"
token: ${{ github.token }}
- content-filepath: ./lychee/out.md
+ content-filepath: lychee/out.md
labels: link_checker
\ No newline at end of file
diff --git a/packages/playground/src/components/connect_wallet_landing.vue b/packages/playground/src/components/connect_wallet_landing.vue
index ae41dc1bc0..3cb09ff0b2 100644
--- a/packages/playground/src/components/connect_wallet_landing.vue
+++ b/packages/playground/src/components/connect_wallet_landing.vue
@@ -16,7 +16,7 @@
>
(storage, compute, and network) provided by farmers. A decentralized sovereign alternative to today’s
centralized Internet model.
- Find More!
+ Find More!
From e0a18a927a40218602b89ee99ff8679ddb62d0f7 Mon Sep 17 00:00:00 2001
From: zaelgohary
Date: Thu, 13 Jun 2024 13:17:20 +0300
Subject: [PATCH 5/9] Edit workflow
---
.github/workflows/link_checker.yml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/link_checker.yml b/.github/workflows/link_checker.yml
index f5a8d4eb03..9f2895ecc1 100644
--- a/.github/workflows/link_checker.yml
+++ b/.github/workflows/link_checker.yml
@@ -16,9 +16,12 @@ jobs:
id: lychee
uses: lycheeverse/lychee-action@v1
with:
- args: --output lychee/out.md
+ args: --output-stdout
continue-on-error: true
+ - name: Write Output to File
+ run: echo "${{ steps.lychee.outputs.stdout }}" > lychee/out.md
+
- name: Set Exit Code
run: echo "::set-output name=lychee_exit_code::${{ steps.lychee.outcome }}"
id: set-exit-code
From fad9448122beb477090f208f9f2131d31c53522f Mon Sep 17 00:00:00 2001
From: zaelgohary
Date: Wed, 19 Jun 2024 12:23:01 +0300
Subject: [PATCH 6/9] Edit link checker
---
.github/workflows/link_checker.yml | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/link_checker.yml b/.github/workflows/link_checker.yml
index 9f2895ecc1..a1920efcc5 100644
--- a/.github/workflows/link_checker.yml
+++ b/.github/workflows/link_checker.yml
@@ -13,24 +13,25 @@ jobs:
- uses: actions/checkout@v4
- name: Link Checker
- id: lychee
- uses: lycheeverse/lychee-action@v1
+ id: checker
+ uses: docker://ghcr.io/threefoldfoundation/website-link-checker:latest
with:
- args: --output-stdout
+ args: 'https://staging.dashboard.dev.grid.tf -e 404 501 503 504 -w all'
continue-on-error: true
- name: Write Output to File
- run: echo "${{ steps.lychee.outputs.stdout }}" > lychee/out.md
+ run: echo "${{ steps.checker.outcome }}" > checker/out.md
- name: Set Exit Code
- run: echo "::set-output name=lychee_exit_code::${{ steps.lychee.outcome }}"
+ run: |
+ echo "checker_exit_code=${{ steps.checker.outcome }}" >> $GITHUB_ENV
id: set-exit-code
- name: Create Issue
- if: steps.set-exit-code.outputs.lychee_exit_code != 'success'
+ if: env.checker_exit_code != 'success'
uses: peter-evans/create-issue-from-file@v4
with:
title: "${{ github.workflow }}: Some links are broken"
token: ${{ github.token }}
- content-filepath: lychee/out.md
+ content-filepath: checker/out.md
labels: link_checker
\ No newline at end of file
From d0ea591523f196df4679abcce8ddcb6487f1fb95 Mon Sep 17 00:00:00 2001
From: zaelgohary
Date: Wed, 19 Jun 2024 12:25:34 +0300
Subject: [PATCH 7/9] discard changed link
---
packages/playground/src/components/connect_wallet_landing.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/playground/src/components/connect_wallet_landing.vue b/packages/playground/src/components/connect_wallet_landing.vue
index 3cb09ff0b2..ae41dc1bc0 100644
--- a/packages/playground/src/components/connect_wallet_landing.vue
+++ b/packages/playground/src/components/connect_wallet_landing.vue
@@ -16,7 +16,7 @@
>
(storage, compute, and network) provided by farmers. A decentralized sovereign alternative to today’s
centralized Internet model.
- Find More!
+ Find More!
From e887243a68f5acaafcf7fa0913308db65afefe6e Mon Sep 17 00:00:00 2001
From: zaelgohary
Date: Wed, 19 Jun 2024 13:08:09 +0300
Subject: [PATCH 8/9] Remove create issue part
---
.github/workflows/link_checker.yml | 22 ++--------------------
1 file changed, 2 insertions(+), 20 deletions(-)
diff --git a/.github/workflows/link_checker.yml b/.github/workflows/link_checker.yml
index a1920efcc5..ca97504f21 100644
--- a/.github/workflows/link_checker.yml
+++ b/.github/workflows/link_checker.yml
@@ -7,7 +7,7 @@ on:
branches: [development, development_2.6]
jobs:
- check-links-and-create-issue:
+ check-links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -16,22 +16,4 @@ jobs:
id: checker
uses: docker://ghcr.io/threefoldfoundation/website-link-checker:latest
with:
- args: 'https://staging.dashboard.dev.grid.tf -e 404 501 503 504 -w all'
- continue-on-error: true
-
- - name: Write Output to File
- run: echo "${{ steps.checker.outcome }}" > checker/out.md
-
- - name: Set Exit Code
- run: |
- echo "checker_exit_code=${{ steps.checker.outcome }}" >> $GITHUB_ENV
- id: set-exit-code
-
- - name: Create Issue
- if: env.checker_exit_code != 'success'
- uses: peter-evans/create-issue-from-file@v4
- with:
- title: "${{ github.workflow }}: Some links are broken"
- token: ${{ github.token }}
- content-filepath: checker/out.md
- labels: link_checker
\ No newline at end of file
+ args: 'https://staging.dashboard.dev.grid.tf -e 404 501 503 504 -w all'
\ No newline at end of file
From 5ce75b6672e33c8fd405925ccc15de2e6be7a01a Mon Sep 17 00:00:00 2001
From: zaelgohary
Date: Wed, 19 Jun 2024 13:17:13 +0300
Subject: [PATCH 9/9] Set workflow to run daily at 8 am
---
.github/workflows/link_checker.yml | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/link_checker.yml b/.github/workflows/link_checker.yml
index ca97504f21..2714335414 100644
--- a/.github/workflows/link_checker.yml
+++ b/.github/workflows/link_checker.yml
@@ -1,10 +1,8 @@
name: Link Checker
on:
- push:
- branches: [development, development_2.6]
- pull_request:
- branches: [development, development_2.6]
+ schedule:
+ - cron: '0 8 * * *'
jobs:
check-links: