Skip to content

Commit fed87c9

Browse files
Merge pull request ipfs#1330 from ElPaisano/ci-cd-test/markdown-link-check
Create pull request link check action and related config file
2 parents 1e72df9 + a7ff3da commit fed87c9

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed

.github/workflows/action.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Check Markdown links for modified files
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
markdown-link-check:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- id: checkout
10+
uses: actions/checkout@master
11+
- id: link-check
12+
uses: gaurav-nelson/github-action-markdown-link-check@v1
13+
with:
14+
config-file: 'mlc_pull_req_config.json'
15+
check-modified-files-only: 'yes'
16+
use-verbose-mode: 'yes'
17+
base-branch: 'main'
18+
use-quiet-mode: 'yes'
19+
- id: summary
20+
run: |
21+
echo '# markdown-link-check summary' >> $GITHUB_STEP_SUMMARY
22+
echo >> $GITHUB_STEP_SUMMARY
23+
echo '## Results: ' >> $GITHUB_STEP_SUMMARY
24+
echo 'To view the results of this GitHub action, do the following:' >> $GITHUB_STEP_SUMMARY
25+
echo '1. Click to the _Job summary generated at run-time_ at the bottom of this page.' >> $GITHUB_STEP_SUMMARY
26+
echo '2. Click the `>` next to _Run gaurav-nelson/github-action-markdown-link-check@v1_ ' >> $GITHUB_STEP_SUMMARY
27+
echo '3. In the search field (upper right hand corner), type _MARKDOWN LINK CHECK_. The log jumps to the output of the markdown-link-check action.' >> $GITHUB_STEP_SUMMARY
28+
echo '4. Look through the log lines below the _=========================> MARKDOWN LINK CHECK <=========================_ line. ' >> $GITHUB_STEP_SUMMARY
29+
echo ' If a dead link was found, it, will be listed below the _ERROR_ line, along with the status code. Find the link in your markdown and fix it.' >> $GITHUB_STEP_SUMMARY
30+
echo ' **Example:**' >> $GITHUB_STEP_SUMMARY
31+
echo ' ``` ' >> $GITHUB_STEP_SUMMARY
32+
echo ' ERROR: 1 dead links found!' >> $GITHUB_STEP_SUMMARY
33+
echo ' [✖] https://givweueerervuvwbeiuv.com#nvruvwrveri → Status: 404' >> $GITHUB_STEP_SUMMARY
34+
echo ' ``` ' >> $GITHUB_STEP_SUMMARY
35+
echo '4. If the action incorrectly identified a link as broken, please help us improve this Github action by reporting any false negatives, false positives or any other issues by [opening a GH issue](https://github.com/ipfs/ipfs-docs/issues/new/choose). Please include the log output in the issue description. ' >> $GITHUB_STEP_SUMMARY

docs/install/ipfs-updater.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ The ipfs-update tool is a command-line utility that can be used to install and u
1010

1111
## Install ipfs-update
1212

13+
1314
You can download pre-built binaries from [`dist.ipfs.tech`](https://dist.ipfs.tech/#ipfs-update). Binaries are also available from the [IPFS Update GitHub release page](https://github.com/ipfs/ipfs-update/releases).
1415

1516

mlc_pull_req_config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"httpHeaders": [
3+
{
4+
"urls": ["https://github.com/", "https://guides.github.com/", "https://help.github.com/", "https://docs.github.com/"],
5+
"headers": {
6+
"Accept-Encoding": "zstd, br, gzip, deflate"
7+
}
8+
}
9+
],
10+
"aliveStatusCodes": [200, 206, 429]
11+
}

0 commit comments

Comments
 (0)