forked from git/git-scm.com
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Broken links are quite an annoyance for readers, and at least for links that point to pages within the same static website, there are tools to help identify those. One such tool is called `lychee`. It has already a number of very useful options and even sports a GitHub Action for easy integration into GitHub workflows. To accommodate the migration of https://git-scm.com/ from a Rails App to a static site generated using Hugo, lychee was taught the trick needed to support checking links in a static website with "pretty URLs" (i.e. URLs lacking the `.html` file extension even though the files backing those URLs do have that extension, something GitHub Pages supports). With this mode, the automation that deploys https://git-scm.com/ can make use of that link checker. Seeing as broken links often originate from repositories outside of https://github.com/git/git-scm.com's control, rather than failing deployment when broken links are detected, let's follow the "best effort" strategy and open a ticket about the broken links while still letting the deployments complete. In PR builds, links are also checked, and broken links will let them fail. While it was tempting to use a convenient GitHub Action like `peter-evans/create-issue-from-file` to open the GitHub issue, there is no readily-available Action to either open, update, or update & close such a ticket, depending on the outcome of the link check and whether such a ticket exists already and is open. Therefore, I opted for a more verbose (and much more powerful) `actions/github-script` step to perform this part of the job. Signed-off-by: Johannes Schindelin <[email protected]>
- Loading branch information
Showing
7 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters