-
-
Notifications
You must be signed in to change notification settings - Fork 638
Add automated markdown link checking GitHub Action #1800
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
Changes from 5 commits
a2970b1
1fdda76
c6fad48
7a6fb6d
dba84c9
bff4ab7
c6293cf
30c931b
ea30632
b286f82
c671785
a6102e0
1545d37
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| { | ||
| "ignorePatterns": [ | ||
| { | ||
| "pattern": "^http://localhost" | ||
| }, | ||
| { | ||
| "pattern": "^https://localhost" | ||
| }, | ||
| { | ||
| "pattern": "^mailto:" | ||
| } | ||
| ], | ||
| "replacementPatterns": [ | ||
| { | ||
| "pattern": "^/", | ||
| "replacement": "https://github.com/shakacode/react_on_rails/blob/master/" | ||
| } | ||
| ], | ||
| "httpHeaders": [ | ||
| { | ||
| "urls": ["https://docs.github.com", "https://github.com"], | ||
| "headers": { | ||
| "Accept": "text/html" | ||
| } | ||
| } | ||
| ], | ||
| "timeout": "20s", | ||
| "retryOn429": true, | ||
| "retryCount": 3, | ||
| "fallbackRetryDelay": "30s", | ||
| "aliveStatusCodes": [200, 206] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| name: Check Markdown Links | ||
|
|
||
| on: | ||
| push: | ||
| branches: [master] | ||
| paths: | ||
| - '**.md' | ||
| - '.github/workflows/check-markdown-links.yml' | ||
| pull_request: | ||
| paths: | ||
| - '**.md' | ||
| - '.github/workflows/check-markdown-links.yml' | ||
| schedule: | ||
| # Run weekly on Monday at 8am UTC | ||
| - cron: '0 8 * * 1' | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| markdown-link-check: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Check markdown links | ||
| uses: gaurav-nelson/github-action-markdown-link-check@v1 | ||
|
||
| with: | ||
| use-quiet-mode: 'yes' | ||
| use-verbose-mode: 'no' | ||
| config-file: '.github/markdown-link-check-config.json' | ||
| folder-path: 'docs/' | ||
| file-extension: '.md' | ||
| max-depth: -1 | ||
| check-modified-files-only: 'no' | ||
| base-branch: 'master' | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,12 @@ | ||
| # Upgrading rails/webpacker v3.5 to v4 | ||
| # Upgrading rails/webpacker v3.5 to v4 (Outdated) | ||
|
|
||
| The following steps can be followed to update a Webpacker v3.5 app to v4. | ||
| _Note: This document is outdated. The configuration files referenced below were removed from React on Rails. For current configuration, see the [install generator templates](https://github.com/shakacode/react_on_rails/tree/master/lib/generators/react_on_rails/templates) or consider upgrading to [Shakapacker](https://github.com/shakacode/shakapacker)._ | ||
|
||
|
|
||
| The following steps could be followed to update a Webpacker v3.5 app to v4: | ||
|
|
||
| 1. Update the gem `webpacker` and the package `@rails/webpacker` | ||
| 1. Merge changes from the new default [.babelrc](https://github.com/shakacode/react_on_rails/tree/master/lib/install/config/.babelrc) to your `/.babelrc`. If you are using React, you need to add `"@babel/preset-react"`, to the list of `presets`. | ||
| 1. Copy the file [.browserslistrc](https://github.com/shakacode/react_on_rails/tree/master/lib/install/config/.browserslistrc) to `/`. | ||
| 1. Merge any differences between [config/webpacker.yml](https://github.com/shakacode/react_on_rails/tree/master/lib/install/config/webpacker.yml) and your `/config/webpacker.yml`. | ||
| 1. Merge changes from the new default `.babelrc` to your `/.babelrc`. If you are using React, you need to add `"@babel/preset-react"`, to the list of `presets`. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you leave links to the files you are mentioning? If the links you have removed are outdated, can you put links to the new files?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you mean copying these files from this directory, leave links for files inside this directory
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
we don't have new files that are equivalent to the files here, they're similar, but will cause confusion. I'm considering leaving the broken links as is, and just make the file as outdated and what they should do instead. |
||
| 1. Copy the file `.browserslistrc` to `/`. | ||
| 1. Merge any differences between `config/webpacker.yml` and your `/config/webpacker.yml`. | ||
|
|
||
| Here is an [example commit of these changes](https://github.com/shakacode/react_on_rails-tutorial-v11/pull/1/files). | ||
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.
The config file
.github/markdown-link-check-config.jsonshould be included as well, since changing it can affect whether the check passes. I initially thought this file shouldn't be included, but the options starting on line 26 do matter.