giantswarm / docs

The Giant Swarm documentation site
http://docs.giantswarm.io
Apache License 2.0
4 stars 8 forks source link

Fix check links and make it simpler #2172

Closed pipo02mix closed 5 months ago

pipo02mix commented 5 months ago

What this PR does / why we need it

It split the check link validation for doc section making it easier to track errors. Also it reduces the checks in changes/ section since we don't want to fix external URLs for old changelog entries

Things to check/remember before submitting

marians commented 5 months ago

It seems like this is not working as intended. I ran it in https://github.com/giantswarm/docs/actions/runs/8539886897/job/23395648737 and the first check starts on the /overview page, but recurses into all other pages. So we end up checking the entire site multiple times.

pipo02mix commented 5 months ago

Fixed. I will try to pass the tests too

pipo02mix commented 5 months ago

sadly it runs against the current online docs.giantswarm.io page so I cannot demonstrate the changes fix the linter :)

pipo02mix commented 5 months ago

@marians can you take a look?

marians commented 5 months ago

I just ran the workflow here: https://github.com/giantswarm/docs/actions/runs/8615042101/job/23609717739

The first step finds broken links and exits with non-zero exit code. As a result, the workflow does not continue after the step, so other links are not checked.

pipo02mix commented 5 months ago

yeah that is a problem, maybe I can cache all errors and only stop if the array is not empty, let me try

pipo02mix commented 5 months ago

now should be okish @marians PTAL

marians commented 5 months ago

Looks like we are getting there!

::set-output is deprecated and will be removed. See https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ for info on what to use instead.

marians commented 5 months ago

Not sure where I saw ::set-output. Probably looked at an outdated diff.