gaurav-nelson / github-action-markdown-link-check

Check all links in markdown files if they are alive or dead. 🔗✔️
MIT License
407 stars 76 forks source link

Issue with empty reply from server #162

Closed sergeyklay closed 1 year ago

sergeyklay commented 1 year ago

If we do curl https://www.zus.pl, we would get the body of the document.

However, github-action-markdown-link-check relies on headers, but no headers returned:

>>> curl -I https://www.zus.pl
curl: (52) Empty reply from server

I'd like to be able to check the status code by sending a request to get the body of the document.

Related issue: https://github.com/sobolevbel/jdg/issues/110

gaurav-nelson commented 1 year ago

Thank you @sergeyklay for creating the issue. However, I think this issue is related to the underlying library markdown-link-check and not this GitHub action. I'm closing this issue, can you please create an issue at https://github.com/tcort/markdown-link-check. Cheers!

sergeyklay commented 1 year ago

@gaurav-nelson I'm not sure that's true. Easy replacement

-    - uses: gaurav-nelson/github-action-markdown-link-check@v1
-       with:
-         use-quiet-mode: 'no'
-         use-verbose-mode: 'yes'
-         config-file: '.github/workflows/markdown_link_check_config.json'

+    - name: install markdown-link-check
+       run: npm i -g markdown-link-check
+
+     - name: run link check
+       run: >-
+         find .
+         -name '*.md'
+         -not -path './node_modules/*'
+         -exec markdown-link-check '{}'
+         --config .github/workflows/markdown_link_check_config.json -v ';'

Solving this issue