microcks / microcks.io

Public website resources and templates
https://microcks-io.vercel.app
Apache License 2.0
8 stars 31 forks source link

Add link checker for Microcks website #75

Open yada opened 2 months ago

yada commented 2 months ago

Reason/Context

Adding a link checker will help to ensure that our website remains user-friendly, search engine optimized, and better maintained.

Description

Add auto checks and reporting using GitHub actions, ideally to create issue and/or markdown reporting and why not (later and after cleanup) on each commit or new PR to enforce it...

Implementation ideas

WIP using Lychee and https://github.com/lycheeverse/lychee-action/

yada commented 2 months ago

First try: https://github.com/microcks/microcks.io/actions/runs/8894544391

yada commented 2 months ago

WIP, as Lychee, is great for checking files and links in files (like README.md ...) but has no recursion option to crawl a website (microcks.io or hugo server using local resources) deeply and efficiently based on my tests.

So, I may plan to use lychee on Microcks org and repos to help maintain README files... but I am checking alternatives using Hugo and GitHub actions for the purpose of this issue.

yada commented 2 months ago

Over the weekend, I made significant progress in our testing efforts, successfully testing all external links using Lychee. This is a great step forward for our project.

This will help sort out existing broken external URLs during the Microcks website's build and deployment phases. Scheduling the action regularly (every day) will also help maintain the site accurately. I'll push the new action as soon as possible, and it will be in production soon.

But, we also need to add another tool to test over HTTP (Hugo or/and deployed site) to cover the links generated by Hugo (markdown and link generation): WIP.

The ideal global workflow (GitHub actions) should be like this:

  1. Test on each commit that it still works (Hugo can build it): This is ✅ see #79
  2. Test using Lychee and Hugo build directory (local public directory) that all external links are OK: will commit ASAP
  3. Test all links recursively over HTTP using? (tool TBD, testing https://github.com/raviqqe/muffet) a building site (hugo server using localhost): WIP
  4. like 3/ but as a smoke test on https://microcks.io/ weekly to be 100% sure: WIP
  5. Deploy automatically if 2/ + 3/ are OK (1/ is implicit as it will block broken links on each commit) -> we will not enable this till we are not 100% clean :-)

Your ideas, comments, and feedback are highly valued and integral to the success of our project. Please feel free to share your thoughts with me. I'd also like any recommendations for tools related to point 3/.

yada commented 2 months ago

1/ hugo-build-status-check.yml and 2/ external-link-check.yml

Are done ✅ and thoroughly tested here: https://github.com/yada/microcks.io/tree/master/.github/workflows

I plan to merge (PR) both next week, but I will disable 2/ (external-link-check.yml) till #81 is not finalized.

We will activate both on #82 to help debug during the refactoring effort (migration...) 🙌

WIP regarding 3/ Test all links recursively over HTTP using? Stay tuned 👀

yada commented 3 weeks ago

81 has been closed and external-link-check.yml is running nighly since then.

It helps to FIX external links 🙌 We have not had any new errors for three days (see #200 #201 #202), so let's keep the "external link check" (important) but every week now.