-
Couldn't load subscription status.
- Fork 705
.github: check connectivity of external links via GitHub action #4135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
dc22788
add external link check and fix two links
99e33c0
exclude crunchbase org profiles
1ef287f
Update technical-writing-project-ideas.md
3f80126
Update adopters.md
6e931dd
set timeout to 10s
6881faf
timeout 20s
0362887
Merge branch 'master' into external-link-check
yikeke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| name: external-link-check | ||
|
|
||
| on: [pull_request] | ||
|
|
||
| jobs: | ||
| base: | ||
| runs-on: ubuntu-18.04 | ||
| steps: | ||
| - name: Check out code | ||
| uses: actions/checkout@v2 | ||
|
|
||
| # NOTE: | ||
| # - the check process can be very fast, | ||
| # but if `-c` is too large then `Too Many Requests (HTTP error 429)` may be reported from `https://github.com/*`. | ||
| # - we hardcode `--document-root` to `/github/workspace` in the container now. | ||
| # - we use `http://172.*` as sample addresses in some docs, so we need to exclude them. | ||
| - name: Check external links | ||
| id: lc | ||
| uses: peter-evans/link-checker@v1 | ||
| with: | ||
| args: -c 32 -d /github/workspace -r -t 20 -x "http://172.*|https://github.com/.*/pull/.*|https://github.com/.*/issues/.*|https://github.com/[^.\n]*$|http://127.0.0.1.*|http://localhost.*|http://.*:.*|https://static.googleusercontent.com/media/research.google.com/.*|https://www.crunchbase.com/organization/.*|.*.md" . | ||
|
|
||
| - name: Fail if there were external link errors | ||
| if: ${{ steps.lc.outputs.exit_code }} | ||
| run: | | ||
| echo "Please check the broken links reported in the previous step \"Check external links\"." | ||
| exit ${{ steps.lc.outputs.exit_code }} | ||
| # Debug via SSH if previous steps failed | ||
| #- name: Set up tmate session | ||
| # if: ${{ failure() }} | ||
| # uses: mxschmitt/action-tmate@v2 |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PTAL @CaitinChen