Skip to content

Commit 5faf473

Browse files
committed
Add broken link checking Action
Also adjusts the entire workflow to only run if a PR or push contains changes to a markdown file
1 parent 2d79a03 commit 5faf473

File tree

4 files changed

+40
-3
lines changed

4 files changed

+40
-3
lines changed

.github/workflows/lint-docs.yml

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,51 @@ on:
44
workflow_dispatch:
55
push:
66
branches: [ main, linux ]
7+
paths:
8+
- '**.md'
9+
- '.github/workflows/lint-docs.yml'
710
pull_request:
811
branches: [ main, linux ]
12+
paths:
13+
- '**.md'
14+
- '.github/workflows/lint-docs.yml'
915

1016
jobs:
1117
lint-markdown:
1218
name: Lint markdown files
1319
runs-on: ubuntu-latest
1420
steps:
15-
- uses: actions/checkout@v3
21+
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
1622

1723
- uses: DavidAnson/markdownlint-cli2-action@744f913a124058ee903768d3adb92a4847e5d132
1824
with:
1925
globs: "**/*.md"
26+
27+
check-links:
28+
name: Check for broken links
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
32+
33+
- name: Run link checker
34+
# For any troubleshooting, see:
35+
# https://github.com/lycheeverse/lychee/blob/master/docs/TROUBLESHOOTING.md
36+
uses: lycheeverse/lychee-action@76ab977fedbeaeb32029313724a2e56a8a393548
37+
38+
with:
39+
# user-agent: if a user agent is not specified, some websites (e.g.
40+
# GitHub Docs) return HTTP errors which Lychee will interpret as
41+
# a broken link.
42+
# no-progress: do not show progress bar. Recommended for
43+
# non-interactive shells (e.g. for CI)
44+
# inputs: by default (.), this action checks files matching the
45+
# patterns: './**/*.md' './**/*.html'
46+
args: >-
47+
--user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36"
48+
--no-progress .
49+
fail: true
50+
env:
51+
# A token is used to avoid GitHub rate limiting. A personal token with
52+
# no extra permissions is enough to be able to check public repos
53+
# See: https://github.com/lycheeverse/lychee#github-token
54+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.lycheeignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
godaddy\.com[\\/]?$
2+
file:[\\/][\\/][\\/].*

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
[Git Credential Manager](https://github.com/GitCredentialManager/git-credential-manager) (GCM) is a secure Git credential helper built on [.NET](https://dotnet.microsoft.com) that runs on Windows, macOS, and Linux.
88

9-
Compared to Git's [built-in credential helpers]((https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage)) (Windows: wincred, macOS: osxkeychain, Linux: gnome-keyring/libsecret) which provides single-factor authentication support working on any HTTP-enabled Git repository, GCM provides multi-factor authentication support for [Azure DevOps](https://dev.azure.com/), Azure DevOps Server (formerly Team Foundation Server), GitHub, Bitbucket, and GitLab.
9+
Compared to Git's [built-in credential helpers](https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage) (Windows: wincred, macOS: osxkeychain, Linux: gnome-keyring/libsecret) which provides single-factor authentication support working on any HTTP-enabled Git repository, GCM provides multi-factor authentication support for [Azure DevOps](https://dev.azure.com/), Azure DevOps Server (formerly Team Foundation Server), GitHub, Bitbucket, and GitLab.
1010

1111
Git Credential Manager (GCM) replaces the .NET Framework-based [Git Credential Manager for Windows](https://github.com/microsoft/Git-Credential-Manager-for-Windows) (GCM), and the Java-based [Git Credential Manager for Mac and Linux](https://github.com/microsoft/Git-Credential-Manager-for-Mac-and-Linux) (Java GCM), providing a consistent authentication experience across all platforms.
1212

docs/netconfig.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ $ git clone https://ghe.example.com/john.doe/myrepo
114114
fatal: The remote certificate is invalid according to the validation procedure.
115115
```
116116

117-
The **recommended and safest option** is to acquire a TLS certificate signed by a public trusted certificate authority (CA). There are multiple public CAs; here is a non-exhaustive list to consider: [Let's Encrypt](https://letsencrypt.org/), [Comodo](https://www.comodoca.com/), [Digicert](https://www.digicert.com/), [GoDaddy](https://www.godaddy.com/web-security/ssl-certificate), [GlobalSign](https://www.globalsign.com/en/ssl/).
117+
The **recommended and safest option** is to acquire a TLS certificate signed by a public trusted certificate authority (CA). There are multiple public CAs; here is a non-exhaustive list to consider: [Let's Encrypt](https://letsencrypt.org/), [Comodo](https://www.comodoca.com/), [Digicert](https://www.digicert.com/), [GoDaddy](https://www.godaddy.com/), [GlobalSign](https://www.globalsign.com).
118118

119119
If it is not possible to **obtain a TLS certificate from a trusted 3rd party** then you should try to add the _specific_ self-signed certificate or one of the CA certificates in the verification chain to your operating system's trusted certificate store ([macOS](https://support.apple.com/en-gb/guide/keychain-access/kyca2431/mac), [Windows](https://blogs.technet.microsoft.com/sbs/2008/05/08/installing-a-self-signed-certificate-as-a-trusted-root-ca-in-windows-vista/)).
120120

0 commit comments

Comments
 (0)