mirror of
				https://github.com/cooklang/awesome-cooklang-recipes.git
				synced 2025-10-29 19:32:58 +00:00 
			
		
		
		
	Add markdown link check.
Add linkcheck.sh that checks the links of all markdown files. Add linkcheck task to Taskfile.yaml Add link-check GitHub Action to add link checks on a daily schedule. Add mlc config file to set access codes to pass. Signed-off-by: nιcнolaѕ wιlde <ncwilde43@gmail.com>
This commit is contained in:
		
							parent
							
								
									1edaccc9cc
								
							
						
					
					
						commit
						d3dbba3323
					
				
							
								
								
									
										24
									
								
								.github/workflows/link-check.yaml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								.github/workflows/link-check.yaml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,24 @@ | |||||||
|  | --- | ||||||
|  | name: link-check | ||||||
|  | on:  # yamllint disable-line rule:truthy | ||||||
|  |   # Schedule check each day at 8 UTC | ||||||
|  |   schedule: [{cron: "0 8 * * *"}] | ||||||
|  |   workflow_dispatch: | ||||||
|  |   pull_request: | ||||||
|  |   push: | ||||||
|  |     branches: | ||||||
|  |       - main | ||||||
|  | 
 | ||||||
|  | jobs: | ||||||
|  |   markdown-link-check: | ||||||
|  |     name: Markdown link check | ||||||
|  |     runs-on: ubuntu-20.04 | ||||||
|  | 
 | ||||||
|  |     steps: | ||||||
|  |       - name: Checkout repo | ||||||
|  |         uses: actions/checkout@v3 | ||||||
|  |       - name: Check markdown links | ||||||
|  |         uses: gaurav-nelson/github-action-markdown-link-check@v1 | ||||||
|  |         with: | ||||||
|  |           file-path: './README.md' | ||||||
|  |           config-file: './mlc_config.json' | ||||||
| @ -20,6 +20,10 @@ tasks: | |||||||
|     cmds: |     cmds: | ||||||
|       - task: awesome-lint |       - task: awesome-lint | ||||||
|       - task: yamllint |       - task: yamllint | ||||||
|  |   linkcheck: | ||||||
|  |     desc: Check for dead links | ||||||
|  |     cmds: | ||||||
|  |       - ./scripts/linkcheck.sh | ||||||
|   render: |   render: | ||||||
|     desc: Render README.md |     desc: Render README.md | ||||||
|     cmds: |     cmds: | ||||||
|  | |||||||
							
								
								
									
										3
									
								
								mlc_config.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								mlc_config.json
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,3 @@ | |||||||
|  | { | ||||||
|  |   "aliveStatusCodes": [200, 206, 403, 429] | ||||||
|  | } | ||||||
							
								
								
									
										8
									
								
								scripts/linkcheck.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										8
									
								
								scripts/linkcheck.sh
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,8 @@ | |||||||
|  | #!/bin/bash | ||||||
|  | set -e | ||||||
|  | set -o pipefail | ||||||
|  | DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )/../" >/dev/null 2>&1 && pwd ) | ||||||
|  | readonly DIR | ||||||
|  | for f in $(find "${DIR}" -name \*.md); do | ||||||
|  |   docker run --rm -v /:/tmp:ro -i -w /tmp ghcr.io/tcort/markdown-link-check:stable "/tmp${f}" -c "/tmp${DIR}/mlc_config.json" || exit 1 | ||||||
|  | done | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user